While loop not ending perfectly when situation fails

while

#1

Hi there,

I have used a While loop to work on certain steps with “urlelement” (this copies URL from a source) is not empty value, as shown in screenshot.

This urlelement picks URL from list present in excel sheet, open it using “Openwebsite” and do some other actions further.

At the end, when there is no URL i.e when urlelement is empty, at that time logically it should stop perfectly. But instead it shows error as shown in screenshot. For better understanding I have marked issue in red and have added comments too on screenshot. Please check and suggest.

Regards


#2

@Ankit_Jain7
Please, run recording 1 more time and the show me the content of log file, from recording folder


#3

By mistake I have closed Media files, due to this only Recorder variables are appearing on left side lower window, kindly suggest how can I bring it back to normal situation.

Regards


#4

@Ankit_Jain7

Run this script again, and then check this log file, please
Or attach here


#5

Below is the log file screenshot.

Also below is the screenshot of error that is again received

Also for your ready reference below is the details captured from this error message:

unknown error: unhandled inspector error: {"code":-32000,"message":"Cannot navigate to invalid URL"}
  (Session info: chrome=58.0.3004.3)
  (Driver info: chromedriver=2.25.426923 (0390b88869384d6eb0d5d09729679f934aab9eed),platform=Windows NT 10.0.10586 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 17 milliseconds
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'IPLCELPT00245', ip: '10.120.8.91', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426923 (0390b88869384d6eb0d5d09729679f934aab9eed), userDataDir=C:\Users\vku\AppData\Local\Temp\scoped_dir8540_1077}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=58.0.3004.3, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 9f7b6501bcf9298cac92af161973051d
Command duration or timeout: 188 milliseconds
Build info: version: '8.3.5-SNAPSHOT', revision: 'unknown', time: '2017-06-14 10:10:21'
System info: host: 'IPLCELPT00245', ip: '10.120.8.91', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: com.freedomoss.crowdcontrol.webharvest.selenium.wrapper.RemoteDriverWrapper
Capabilities [{sikuliThreshold=0.8, webdriver.remote.sessionid=74d0f044-1f5d-4fa2-8d9a-88676658e825, CLOSE_ALL_WINDOWS=false, browserName=universal, takesScreenshot=true, javascriptEnabled=true, SEARCH_ALL_WINDOWS=true, platform=WINDOWS}]
Session ID: 74d0f044-1f5d-4fa2-8d9a-88676658e825
  org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {"code":-32000,"message":"Cannot navigate to invalid URL"}
  (Session info: chrome=58.0.3004.3)
  (Driver info: chromedriver=2.25.426923 (0390b88869384d6eb0d5d09729679f934aab9eed),platform=Windows NT 10.0.10586 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 17 milliseconds
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'IPLCELPT00245', ip: '10.120.8.91', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.25.426923 (0390b88869384d6eb0d5d09729679f934aab9eed), userDataDir=C:\Users\vku\AppData\Local\Temp\scoped_dir8540_1077}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=58.0.3004.3, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 9f7b6501bcf9298cac92af161973051d
Command duration or timeout: 188 milliseconds
Build info: version: '8.3.5-SNAPSHOT', revision: 'unknown', time: '2017-06-14 10:10:21'
System info: host: 'IPLCELPT00245', ip: '10.120.8.91', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: com.freedomoss.crowdcontrol.webharvest.selenium.wrapper.RemoteDriverWrapper
Capabilities [{sikuliThreshold=0.8, webdriver.remote.sessionid=74d0f044-1f5d-4fa2-8d9a-88676658e825, CLOSE_ALL_WINDOWS=false, browserName=universal, takesScreenshot=true, javascriptEnabled=true, SEARCH_ALL_WINDOWS=true, platform=WINDOWS}]
Session ID: 74d0f044-1f5d-4fa2-8d9a-88676658e825
  	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
  	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
  	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
  	at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:284)
  	at com.workfusion.rpa.helpers.RPA.openChrome(RPA.java:448)
  	at com.workfusion.studio.rpa.recorder.model.action.web.OpenURLInChromeAction.openUrl(OpenURLInChromeAction.java:21)
  	at com.workfusion.studio.rpa.recorder.model.action.web.AbstractOpenURLAction.executeAction(AbstractOpenURLAction.java:33)
  	at com.workfusion.studio.rpa.recorder.model.action.ActionWithDelay.execute(ActionWithDelay.java:27)
  	at com.workfusion.studio.rpa.recorder.processor.ActionFlowPlayer.execute(ActionFlowPlayer.java:317)
  	at com.workfusion.studio.rpa.recorder.processor.ActionFlowPlayer.processAction(ActionFlowPlayer.java:256)
  	at com.workfusion.studio.rpa.recorder.model.action.WhileAction.executeAction(WhileAction.java:43)
  	at com.workfusion.studio.rpa.recorder.model.action.ActionWithDelay.execute(ActionWithDelay.java:27)
  	at com.workfusion.studio.rpa.recorder.processor.ActionFlowPlayer.execute(ActionFlowPlayer.java:317)
  	at com.workfusion.studio.rpa.recorder.processor.ActionFlowPlayer.processAction(ActionFlowPlayer.java:256)
  	at com.workfusion.studio.rpa.recorder.processor.ActionFlowPlayer.lambda$1(ActionFlowPlayer.java:120)
  	at java.util.ArrayList.forEach(ArrayList.java:1249)
  	at com.workfusion.studio.rpa.recorder.processor.ActionFlowPlayer.lambda$0(ActionFlowPlayer.java:120)
  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  	at java.lang.Thread.run(Thread.java:745)

Thanks


#6

@Ankit_Jain7
Most probably this variable contains something (when you copy from clipboard), like spaces or line breaks.
Can you try different condition, While contains .com, or similar