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.