Float.parseFloat not working

Hello, I have been trying to use Float.parseFloat on a string.

This is the following code:

CTime1 = WebUI.getAttribute(findTestObject(‘Kobi/New Folder/video_Cast_hlsjsContent (1)’), ‘currentTime’)

Dur1 = WebUI.getAttribute(findTestObject(‘Kobi/New Folder/video_Cast_hlsjsContent (1)’), ‘duration’)

CTimeFloat = Float.parseFloat(CTime1)

DurFloat = Float.parseFloat(Dur1)

LiveDist1 = (Dur1 - CTime1)

WebUI.verifyLessThanOrEqual(LiveDist1, 45)

Usually when things go wrong I’ll see an error and which line it occurred on. However when I run this test, katalon just skips over the Float.parseFloat, nothing errors out. The parseFloat seems to never be hit or at least it’s not acting as expected. I have searched the forum and it appears that I’m writing it the same way as others have. Any suggestions or help will be much appreciated.

Found the problem, sorry we can close this.

Before it’s closed, it would be beneficial to others if you posted the solution.

I was using the wrong variables. Instead of using the parseFloat objects (CTimeFloat, DurFloat) to subtract, I was using the variables that grabbed currentTime and duration (CTime1, Dur1). Once I used the correct variables everything worked. My apologies for wasting anyone’s time.