0

I have created an executable jar file to run on chrome. However, since the past few releases, I am getting a script debugging pop-up. This doesn't essentially look like a code error. However, I would like to know if there is any option to turn off script debugging from chromedriver.exe

Alternatively, is there any setting in eclipse that I need to see before I publish the executable jar that would keep the debugging off? Unfortunately, there is no particular point where this pop up appears. It comes any time at any point. Also due to company policy, I will not be able to provide the complete code for your checking but find the unhandled alert exception that shows up before this alert.

Kindly check if you can provide a generic answer to solve this issue.

enter image description here

org.openqa.selenium.UnhandledAlertException: unexpected alert open: {Alert text : It is a ComDebug error. Please close a debug window and restart(Ctrl+Shift+X).}
  (Session info: chrome=70.0.3538.110)
  (Driver info: chromedriver=2.41.578737 (49da6702b16031c40d63e5618de03a32ff6c197e),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds: null
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:05:20.749Z'
System info: host: 'IPSH-DES-570', ip: '10.91.26.138', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_191'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.41.578737 (49da6702b16031..., userDataDir: C:\Users\NARAYA~1\AppData\L...}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:53612}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 70.0.3538.110, webStorageEnabled: true}
Session ID: b112dc8d5914d5554252863832828baa
*** Element info: {Using=id, value=btn_t8Save}
JeffC
  • 22,180
  • 5
  • 32
  • 55
  • do you use extension? and post your code. – ewwink Dec 14 '18 at 17:54
  • Are you loading an existing profile? If so, try not loading it... load just a default driver and see if that fixes the issue. I'm wondering if your profile doesn't have some add-in that's causing this issue. – JeffC Dec 15 '18 at 05:44

2 Answers2

0

This error message...

org.openqa.selenium.UnhandledAlertException: unexpected alert open: {Alert text : It is a ComDebug error. Please close a debug window and restart(Ctrl+Shift+X).}

...implies that there was an Alert present which wasn't handled.

The relevant HTML and your code trials would have helped us to analyze the issue in a better way.

However, your main issue seems to be the incompatibility between the version of the binaries you are using as follows:

  • You are using chromedriver=2.41
  • Release Notes of chromedriver=2.41 clearly mentions the following :

Supports Chrome v67-69

  • You are using chrome=70.0

So there is a clear mismatch between the ChromeDriver v2.41 and the Chrome Browser v70.0

Solution

  • Upgrade ChromeDriver to current ChromeDriver v2.45 level.
  • Keep Chrome version between Chrome v70-72 levels. (as per ChromeDriver v2.45 release notes)
  • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
  • If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
  • Take a System Reboot.
  • Execute your @Test.
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • OP already stated he is aware there is an alert in the question. He's asking how to disable the script debugging alert which your list of 10 things to try doesn't address. You've been told several times before not to do this because it's not useful. – JeffC Dec 15 '18 at 05:42
  • @JeffC I doubt if you have actually read the answer. We all know historically you are reluctant to debug any of the user issues and you try to create chaos by blatantly downvoting questions and answers with your limited exposure/knowledge. Maintaining this approach you won't be able to transit in to Selenium v4.0. – undetected Selenium Dec 15 '18 at 09:44
  • I did read the answer... and the question. You should try it. That's why I told you exactly what's wrong with your answer and why it doesn't answer the question. I do intentionally (blatantly) downvote questions and answers... that's what the downvote button is for. Here the downvote button tooltip states that it's for answers that aren't useful... and I told you why your answer isn't useful. I'm not the only one telling you this about your answers, especially answers that you repeatedly post in this format which are a long list that isn't relevant to the question. – JeffC Dec 15 '18 at 14:32
  • If you read the question so carefully, why did you start your answer with the fact that the error is due to an unhandled alert when OP already stated in his question, `...find the unhandled alert exception that shows up before this alert.`? The question is `How do I turn off script debugging?`... where is your answer to that question? – JeffC Dec 15 '18 at 14:34
  • Hopefully if this is the problem, I will try when I get back to office on Monday. I will try to use the latest chromedriver for the bulid. However, I am using the the current chromedriver on some PCs with the Chrome version 67. They too get the same error. So essentially I want the script debugging off from Chromedriver. Thanks – Prashant Vaingankar Dec 16 '18 at 08:30
  • Even after upgrading the chromedriver and Chrome version, we are still getting the error. any thoughts apart from this? – Prashant Vaingankar Dec 19 '18 at 14:17
  • @PrashantVaingankar Your comment doesn't helps me either. Sorry, the answer didn't help you to solve your problem but how am I going to improve my post with that feedback? – undetected Selenium Dec 20 '18 at 06:05
0

You can hide the console logs, by redirecting them:

  • Firefox

    System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE,LogsPath());

  • Chrome

    System.setProperty("webdriver.chrome.logfile", LogsPath());

  • IE

    System.setProperty("webdriver.ie.driver.logfile", LogsPath());

Neagu V
  • 470
  • 4
  • 16