ChromeとIEのブラウザを使用しています。現在のブラウザを再起動して実行を続行する必要があります。ブラウザを再起動すると、現在のブラウザが閉じられ、指定されたURLで新しいブラウザが起動されますが、次のエラーがスローされます。
そのようなセッションはありません(ドライバー情報:chromedriver = 2.10.267521、platform = Windows NT 6.2 x86_64)
スクリプトは次のとおりです。
$log.info("Due to exception '#{ex}' the current browser is being restarted")
@browser = EHR::BrowserSettings.restart_browser
sleep 10
@browser.navigate.to(DESKTOP_APP_URL)
sleep 3
この後、ログインスクリプトが実行されます。エラーを解決するにはどうすればよいですか?
No actually the script is After block :
if scenario.failed?
$log.info("Due to exception the current browser is being restarted")
@browser = nil
@browser = EHR::BrowserSettings.restart_browser
@browser.navigate.to(DESKTOP_APP_URL)
.....
this script is working (its relaunching the browser with the given URL).
Im trying to close the browser window in at_exit() hook and here im not able to get the @browser object value and hence could not close the browser.
I jst need to close it in the at_exit block. Is there any way to do it.
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加