Содержание
- I can’t make v2 driver work without headless option #217
- Comments
- Selenium.common.exceptions.WebDriverException: сообщение: неизвестная ошибка: невозможно обнаружить открытые страницы с помощью ChromeDriver через Selenium
- Решение
- Дополнительные соображения
- Selenium.common.exceptions.WebDriverException: сообщение: неизвестная ошибка: невозможно обнаружить открытые страницы во время выполнения теста через InstaPy и селен
- Решение
- Обновлять
- Unable to spawn Edge browser with WebDriverException: Message: Unknown error #7690
- Comments
- 🐛 Bug Report
- To Reproduce
- Expected behavior
- Test script or set of commands reproducing this issue
- Environment
- selenium.common.exceptions¶
I can’t make v2 driver work without headless option #217
If i use the headless option, like the following, v2 driver works fine:
But if I don’t use the headless option, the driver initialisation hangs and I get this error:
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:39865 from chrome not reachable
I am tryng to make it work on an ubuntu server (no physical display).
I tried
But it’s not working either.
Thanks for any help!
The text was updated successfully, but these errors were encountered:
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:39865 from chrome not reachable
I think this error related to lack of display (headless system).
Recently got same on my ubuntu server when tried to run driver without —headless option.
In headless mode I did not managed to pass through cloudflare ddos window, so installed openbox and vnc to emulate display for driver.
on ubuntu server
docker+xvfb+uc.v2+headful is ok
the subprocess may be return a error, then remote-debugging-port will be closed,
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:39865 from chrome not reachable
add temp code to see the error output
@daltonxiong I’m getting the chrome cannot connect, but can’t seem to understand your solution, can you be more specific?
@Dukisef012 cannot connect caused by google-chrome exit.
Источник
Selenium.common.exceptions.WebDriverException: сообщение: неизвестная ошибка: невозможно обнаружить открытые страницы с помощью ChromeDriver через Selenium
I я новичок в селене, просто пытаюсь научиться. При попытке открыть браузер Chrome через ChromeDriver я получил следующую ошибку:
Пробовал много погуглить, но ничего не помогло. Ниже мой код:
Это не код, с которым нужно иметь дело, но я не понимаю, что мне здесь не хватает. Также, пожалуйста, предложите какой-нибудь хороший онлайн-ресурс для изучения Python Selenium. Мой открытый хром выглядел, как показано ниже:
Это сообщение об ошибке .
. означает, что ChromeDriver не смог инициировать / создать новый Веб-браузер, то есть сеанс Браузер Chrome.
Решение
Добавьте аргумент от —no-sandbox до ChromeOptions() к существующему коду следующим образом:
Дополнительные соображения
- Обновить Селен до текущего уровня Версия 3.14.0.
- Обновите ChromeDriver до текущего уровня ChromeDriver v2.41.
- Держите версию Хром между уровнями Chrome v66-68. (согласно примечаниям к выпуску ChromeDriver v2.41)
- Чистый ваш Рабочая область проекта через ваш IDE и Восстановить ваш проект только с необходимыми зависимостями.
- Выполните свой @Контрольная работа.
- Всегда вызывайте driver.quit() в методе tearDown()<> , чтобы корректно закрыть и уничтожить экземпляры WebDriver и Веб-клиент.
Комментарии (8)
Ничего не помогло с той же проблемой «selenium.common.exceptions.WebDriverException: сообщение: неизвестная ошибка: невозможно обнаружить открытое окно в Chrome (информация о сеансе: chrome = 67.0.3396.79) (информация о драйвере: chromedriver = 2.41.578737 (49da6702b16031c40d63e5618de03a32ff6c19) = Windows NT 6.1.7601 SP1 x86_64) «
Ознакомьтесь с моим обновленным ответом и сообщите мне статус.
Работает как шарм, спасибо. Можете ли вы предложить мне лучший ресурс для изучения Selenium в Python.
@ k.lo Официально Документация по Selenium и неофициально WebDriver API — лучшие документы для изучения Selenium на Python.
Этот ответ не объясняет, что делает —no-sandbox , и не объясняет, почему он устраняет проблему. Очевидно, этот ответ предлагает отключить функцию безопасности, которая включена по умолчанию. Обычно это признак плохого решения. Этот ответ нужно улучшить.
Это происходит со мной при разработке электроники, возможно ли, что у меня неправильная версия моей электронной версии и совпадает ли электронно-хромированная версия, может ли это быть затронуто версией хрома, установленной на моем компьютере? Я потерял идеи о том, почему он терпит неудачу при этом вызове в ванильной реализации встроенного электронного спектрона
@JodySowald Давайте подробно обсудим в Селен Чат
@DebanjanB Спасибо, извините, я тогда не ответил вам, я решил исключить Spectron (вещь, которая использует хромированные драйверы). это рекомендуется, но, похоже, не служит другой цели, кроме отделения тестов от основного кода, который мы можем организовать просто отлично.
Источник
Selenium.common.exceptions.WebDriverException: сообщение: неизвестная ошибка: невозможно обнаружить открытые страницы во время выполнения теста через InstaPy и селен
Я хочу запустить InstaPy в Windows на основе эта инструкция поэтому я установил его до шага 3, и я нахожусь в расширенной настройке. потому что простая настройка не сработала для меня. Теперь я установил инструмент с графическим интерфейсом из установочный файл .exe, и запуск бота откроет страницу Chrome, как это, и через некоторое время я получаю сообщение об ошибке ниже. что мне делать? где я ошибся?
Im google chrome Version 68.0.3440.75 (официальная сборка) (64-разрядная версия), и в настоящее время я использую chromedriver.exe версии 2.4 и python 3.6.5
сначала я вижу эту хромированную страницу:
и после этого я вижу эту ошибку в графическом интерфейсе ошибка в этом
Обновлено: Я загрузил 2.40 и поместил его в папку с ресурсами, но его 2.4.226107 в сообщении об ошибке chromedriver = 2.4.226107
Это сообщение об ошибке .
. подразумевает, что ChromeDriver не смог инициировать / порождать новый сеанс WebBrowsing через Браузер Chrome.
Ваша основная проблема — это несовместимость между версиями двоичных файлов, которые вы используете, следующим образом:
- Вы используете chromedriver = 2,4
- chromedriver = 2,4 — это довольно Старый и древний.
- Вы используете Google Chrome версии 68.0.3440.75 (официальная сборка) (64-разрядная версия)
- Примечания к выпуску ChromeDriver v2.40 четко упоминают следующее:
Supports Chrome v66-68
Таким образом, существует явное несоответствие между ChromeDriver v2.4 и Браузер Chrome версии 68.0.
Решение
- Поскольку вы используете Версия Google Chrome 68.0.3440.75 согласно Примечания к выпуску, вам необходимо использовать совместимый двоичный файл ChromeDriver.
- Загрузите совместимый двоичный файл ChromeDriver, то есть ChromeDriver v2.40 (2018-06-07) из ChromeDriver — WebDriver для Chrome.
Обновлять
Как вы упомянули, даже после обновления до хромированный = 2,40 вы по-прежнему используете версию ChromeDriver как chromedriver = 2,4, вы можете переопределить предыдущую версию в ПУТЬ ОС, явно указав аргумент executable_path следующим образом:
Я использую хромированную отвертку 2.4
@ mohammadfallah.rasoulnejad Возможно, ChromeDriver v2.4 — это просто Старый и древний, а текущая версия GA — ChromeDriver v2.40. Проверьте ссылку Примечания к выпуску в моем ответе.
Обновите вопрос, указав ваши текущие двоичные версии вместе с вашими испытания кода и трассировка стека ошибок для дальнейшего анализа.
нет разницы в трассировке стека, чем я думаю, но обновил вопрос
Если в сообщении об ошибке отображается chromedriver=2.4.226107 , это означает, что chromedriver=2.4 все еще действует, но не chromedriver=2.40 . Вы можете это прояснить?
где мне его поменять? Я поместил 2,40 в системный PATH и удалил 2,4 со своего компьютера. Вы уверены, что 2.4 и 2.40 — это не одно и то же?
Переопределите system PATH , явно указав аргумент executable_path .
Источник
Unable to spawn Edge browser with WebDriverException: Message: Unknown error #7690
🐛 Bug Report
I’m unable to launch Edge in Selenium with Python. When trying to create the driver I get:
Windows version: Windows 10 Pro, 1809, 17763.805, running in Azure
Selenium version: 3.141.0
Python version: 3.7.4 64-bit (the one from here: https://www.python.org/downloads/release/python-374/)
Java version: 1.8.0_221
EdgeDriver version: 10.0.17763.1 (from MicrosoftWebDriver.exe —version )
To Reproduce
Detailed steps to reproduce the behavior:
Install Python, Java.
Add EdgeDriver to Windows via: PC Settings -> Search «optional features» -> Add a feature -> Install Microsoft WebDriver. Then reboot to make it appear in C:WindowsSystem32 .
Then inside command prompt:
I’ve also checked in Task Manager that no instances of Edge (as I know it doesn’t have multiple profiles) or MicrosoftWebDriver are already running. If any were, I killed them off.
Expected behavior
Edge launches as all the other browsers I’ve tried do and I can then drive it via my driver instance.
Test script or set of commands reproducing this issue
See detailed steps to reproduce above.
Environment
OS: Windows 10 Pro, 1809, 17763.805, running in Azure
Browser: Edge
Browser version: Microsoft Edge 44.17763.771.0
Browser Driver version: 10.0.17763.1 (from MicrosoftWebDriver.exe —version )
Language Bindings version: Python 3.7.4 64-bit
Selenium version (if applicable): 3.141.0
The text was updated successfully, but these errors were encountered:
Источник
selenium.common.exceptions¶
Exceptions that may happen in all the webdriver code.
ElementClickInterceptedException (msg, …) | The Element Click command could not be completed because the element receiving the events is obscuring the element that was requested to be clicked. |
ElementNotInteractableException (msg, …) | Thrown when an element is present in the DOM but interactions with that element will hit another element due to paint order |
ElementNotSelectableException (msg, …) | Thrown when trying to select an unselectable element. |
ElementNotVisibleException (msg, …) | Thrown when an element is present on the DOM, but it is not visible, and so is not able to be interacted with. |
ImeActivationFailedException (msg, …) | Thrown when activating an IME engine has failed. |
ImeNotAvailableException (msg, None] = None, …) | Thrown when IME support is not available. |
InsecureCertificateException (msg, …) | Navigation caused the user agent to hit a certificate warning, which is usually the result of an expired or invalid TLS certificate. |
InvalidArgumentException (msg, None] = None, …) | The arguments passed to a command are either invalid or malformed. |
InvalidCookieDomainException (msg, …) | Thrown when attempting to add a cookie under a different domain than the current URL. |
InvalidCoordinatesException (msg, …) | The coordinates provided to an interaction’s operation are invalid. |
InvalidElementStateException (msg, …) | Thrown when a command could not be completed because the element is in an invalid state. |
InvalidSelectorException (msg, None] = None, …) | Thrown when the selector which is used to find an element does not return a WebElement. |
InvalidSessionIdException (msg, None] = None, …) | Occurs if the given session id is not in the list of active sessions, meaning the session either does not exist or that it’s not active. |
InvalidSwitchToTargetException (msg, …) | Thrown when frame or window target to be switched doesn’t exist. |
JavascriptException (msg, None] = None, …) | An error occurred while executing JavaScript supplied by the user. |
MoveTargetOutOfBoundsException (msg, …) | Thrown when the target provided to the ActionsChains move() method is invalid, i.e. |
NoAlertPresentException (msg, None] = None, …) | Thrown when switching to no presented alert. |
NoSuchAttributeException (msg, None] = None, …) | Thrown when the attribute of element could not be found. |
NoSuchCookieException (msg, None] = None, …) | No cookie matching the given path name was found amongst the associated cookies of the current browsing context’s active document. |
NoSuchElementException (msg, None] = None, …) | Thrown when element could not be found. |
NoSuchFrameException (msg, None] = None, …) | Thrown when frame target to be switched doesn’t exist. |
NoSuchShadowRootException (msg, None] = None, …) | Thrown when trying to access the shadow root of an element when it does not have a shadow root attached. |
NoSuchWindowException (msg, None] = None, …) | Thrown when window target to be switched doesn’t exist. |
ScreenshotException (msg, None] = None, …) | A screen capture was made impossible. |
SessionNotCreatedException (msg, …) | A new session could not be created. |
StaleElementReferenceException (msg, …) | Thrown when a reference to an element is now “stale”. |
TimeoutException (msg, None] = None, screen, …) | Thrown when a command does not complete in enough time. |
UnableToSetCookieException (msg, …) | Thrown when a driver fails to set a cookie. |
UnexpectedAlertPresentException (msg, …) | Thrown when an unexpected alert has appeared. |
UnexpectedTagNameException (msg, …) | Thrown when a support class did not get an expected web element. |
UnknownMethodException (msg, None] = None, …) | The requested command matched a known URL but did not match any methods for that URL. |
WebDriverException (msg, None] = None, …) | Base webdriver exception. |
exception selenium.common.exceptions. ElementClickInterceptedException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
The Element Click command could not be completed because the element receiving the events is obscuring the element that was requested to be clicked.
exception selenium.common.exceptions. ElementNotInteractableException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when an element is present in the DOM but interactions with that element will hit another element due to paint order
exception selenium.common.exceptions. ElementNotSelectableException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when trying to select an unselectable element.
For example, selecting a ‘script’ element.
exception selenium.common.exceptions. ElementNotVisibleException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when an element is present on the DOM, but it is not visible, and so is not able to be interacted with.
Most commonly encountered when trying to click or read text of an element that is hidden from view.
exception selenium.common.exceptions. ImeActivationFailedException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when activating an IME engine has failed.
exception selenium.common.exceptions. ImeNotAvailableException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when IME support is not available. This exception is thrown for every IME-related method call if IME support is not available on the machine.
exception selenium.common.exceptions. InsecureCertificateException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Navigation caused the user agent to hit a certificate warning, which is usually the result of an expired or invalid TLS certificate.
exception selenium.common.exceptions. InvalidArgumentException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
The arguments passed to a command are either invalid or malformed.
exception selenium.common.exceptions. InvalidCookieDomainException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when attempting to add a cookie under a different domain than the current URL.
exception selenium.common.exceptions. InvalidCoordinatesException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
The coordinates provided to an interaction’s operation are invalid.
exception selenium.common.exceptions. InvalidElementStateException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when a command could not be completed because the element is in an invalid state.
This can be caused by attempting to clear an element that isn’t both editable and resettable.
exception selenium.common.exceptions. InvalidSelectorException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when the selector which is used to find an element does not return a WebElement. Currently this only happens when the selector is an xpath expression and it is either syntactically invalid (i.e. it is not a xpath expression) or the expression does not select WebElements (e.g. “count(//input)”).
exception selenium.common.exceptions. InvalidSessionIdException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Occurs if the given session id is not in the list of active sessions, meaning the session either does not exist or that it’s not active.
exception selenium.common.exceptions. InvalidSwitchToTargetException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when frame or window target to be switched doesn’t exist.
exception selenium.common.exceptions. JavascriptException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
An error occurred while executing JavaScript supplied by the user.
exception selenium.common.exceptions. MoveTargetOutOfBoundsException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when the target provided to the ActionsChains move() method is invalid, i.e. out of document.
exception selenium.common.exceptions. NoAlertPresentException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when switching to no presented alert.
This can be caused by calling an operation on the Alert() class when an alert is not yet on the screen.
exception selenium.common.exceptions. NoSuchAttributeException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when the attribute of element could not be found.
You may want to check if the attribute exists in the particular browser you are testing against. Some browsers may have different property names for the same property. (IE8’s .innerText vs. Firefox .textContent)
exception selenium.common.exceptions. NoSuchCookieException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
No cookie matching the given path name was found amongst the associated cookies of the current browsing context’s active document.
exception selenium.common.exceptions. NoSuchElementException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when element could not be found.
If you encounter this exception, you may want to check the following:
- Check your selector used in your find_by…
- Element may not yet be on the screen at the time of the find operation, (webpage is still loading) see selenium.webdriver.support.wait.WebDriverWait() for how to write a wait wrapper to wait for an element to appear.
exception selenium.common.exceptions. NoSuchFrameException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source]¶
Thrown when frame target to be switched doesn’t exist.
exception selenium.common.exceptions. NoSuchShadowRootException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when trying to access the shadow root of an element when it does not have a shadow root attached.
exception selenium.common.exceptions. NoSuchWindowException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when window target to be switched doesn’t exist.
To find the current set of active window handles, you can get a list of the active window handles in the following way:
A screen capture was made impossible.
exception selenium.common.exceptions. SeleniumManagerException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Raised when an issue interacting with selenium manager occurs.
exception selenium.common.exceptions. SessionNotCreatedException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
A new session could not be created.
exception selenium.common.exceptions. StaleElementReferenceException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when a reference to an element is now “stale”.
Stale means the element no longer appears on the DOM of the page.
Possible causes of StaleElementReferenceException include, but not limited to:
- You are no longer on the same page, or the page may have refreshed since the element was located.
- The element may have been removed and re-added to the screen, since it was located. Such as an element being relocated. This can happen typically with a javascript framework when values are updated and the node is rebuilt.
- Element may have been inside an iframe or another context which was refreshed.
exception selenium.common.exceptions. TimeoutException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source]¶
Thrown when a command does not complete in enough time.
exception selenium.common.exceptions. UnableToSetCookieException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when a driver fails to set a cookie.
exception selenium.common.exceptions. UnexpectedAlertPresentException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None, alert_text: Optional[str, None] = None ) [source] ¶
Thrown when an unexpected alert has appeared.
Usually raised when an unexpected modal is blocking the webdriver from executing commands.
exception selenium.common.exceptions. UnexpectedTagNameException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
Thrown when a support class did not get an expected web element.
exception selenium.common.exceptions. UnknownMethodException ( msg: Optional[str, None] = None, screen: Optional[str, None] = None, stacktrace: Optional[Sequence[str], None] = None ) [source] ¶
The requested command matched a known URL but did not match any methods for that URL.
Источник
See http://goo.gl/ll2FvQ for common issues.
Issue Description:
Yesterday I have update latest version of chrome (32.xxx)
After that my scripts are not able to open the AUT in mobile browser.
I am using Mobile user agent on chrome.
Here is the user agent string that I am using:
System.setProperty("webdriver.chrome.driver",
"Lib\chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.addArguments("user-data-dir=C:/Users/user_name/AppData/Local/Google/Chrome/User Data");
options.addArguments("--user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53");
options.addArguments("--start-maximized");
// FirefoxProfile profile = new FirefoxProfile();
// profile.setPreference("general.useragent.override","Mozilla/5.0 (iPhone;
U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like
Gecko) Version/4.0 Mobile/7A341 Safari/528.16");
// PCHdriver = new FirefoxDriver(profile);
PCHdriver = new ChromeDriver(options);
PCHdriver.manage().window().maximize();
PCHdriver.manage().deleteAllCookies();
What happens IF I run the script:
It open the chrome browser and after some time it close it and giving error:
org.openqa.selenium.WebDriverException: unknown error: unable to discover open
pages
(Driver info: chromedriver=2.2,platform=Windows NT 6.1 x86) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 26.83 seconds
Build info: version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:12:12'
System info: host: 'QAVM-9', ip: '27.101.1.26', os.name: 'Windows 7', os.arch:
'x86', os.version: '6.1', java.version: '1.7.0_45'
Driver info: org.openqa.selenium.chrome.ChromeDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
at org.openqa.selenium.chrome.ChromeDriver.startSession(ChromeDriver.java:182)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:115)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:161)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:150)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:139)
Please help me, It completely stop the execution.
Let me know in case need any other information.
-----Other helpful tips:
Attach your chromedriver log with verbose logging enabled (see
http://goo.gl/5Sx8mC for how to do this).
Original issue reported on code.google.com by shailend...@gmail.com
on 17 Jan 2014 at 1:00
- Merged into: Wait 60 seconds for chrome to start up on all OS and 30 seconds for chrome shutdown on Mac and Linux. #672
Selenium Chromedriver Error Message: u’unknown error: unable to discover open pages
If you use selenium webdriver to automate regression test cases, you may have got the following error. Because a bug in chromedriver version 2.3 causes this error. According to Google Dev., this problem had fixed in version 2.6.
Assigning the chrome driver to driver leads to this error by the line 38, which is self.driver = webdriver.Chrome(). To solve the problem, you need to change the chromedriver version 2.3 in your execution path, like C:WindowsSystem32 under Windows, with newer version. You can download chrome driver from googleapis.
Error message may like this:
Traceback (most recent call last):
File «D:workspaceautomation_projectrun.py», line 32, in <module>
m = Project(browser, server)
File «D:workspaceautomation_projecttest_case_imps.py», line 38, in __init__
self.driver = webdriver.Chrome()
File «C:Python27libsite-packagesselenium-2.35.0-py2.7.eggseleniumwebdriverchromewebdriver.py», line 64, in __init__
desired_capabilities=desired_capabilities)
File «C:Python27libsite-packagesselenium-2.35.0-py2.7.eggseleniumwebdriverremotewebdriver.py», line 72, in __init__
self.start_session(desired_capabilities, browser_profile)
File «C:Python27libsite-packagesselenium-2.35.0-py2.7.eggseleniumwebdriverremotewebdriver.py», line 114, in start_session
‘desiredCapabilities’: desired_capabilities,
File «C:Python27libsite-packagesselenium-2.35.0-py2.7.eggseleniumwebdriverremotewebdriver.py», line 165, in execute
self.error_handler.check_response(response)
File «C:Python27libsite-packagesselenium-2.35.0-py2.7.eggseleniumwebdriverremoteerrorhandler.py», line 164, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: u’unknown error: unable to discover open pagesn (Driver info: chromedriver=2.3,platform=Windows NT 6.3 x86_64)’
To setup your environment for internet explorer and chrome, you can read this post.
Popular posts for software testing and automation
Selenium webdriver can drive different browsers like as Firefox, Chrome or Internet Explorer. These browsers actually cover the majority of internet users, so testing these browsers possibly covers the 90% of the internet users. However, there is no guaranty that the same automation scripts can work without a failure on these three browsers. For this reason, automation code should be error-prone for the browsers you want to cover. The following error is caught when the test script run for Chrome and Internet Explorer, but surprisingly there is no error for the Firefox. Selenium gives an error like below: Traceback (most recent call last): File «D:workspacesample_projectsample_run.py», line 10, in <module> m.login() File «D:workspace sample_project test_case_imps.py», line 335, in login driver.find_element_by_id(«id_username»).clear() File «C:Python27libsite-packagesselenium-2.35.0-py2.7.eggseleniumwebdriverr
One of the biggest challenge for automation is handling timeout problem. Most of the time, timeout is 60 seconds but it may sometimes not enough if you have badly designed asynchronous calls or the third party ajax calls. This makes handling timeout more complex. set large enough to tolerate network related problems. For Selenium based automation frameworks, like Capybara, default Webdriver timeout is set to Net::ReadTimeout (Net::ReadTimeout) Changing ReadTimeout If you have timeout problem for Capybara, it gives an error like above. This means that the page is not fully loaded in given timeout period. Even you can see that page is loaded correctly but webdriver wait until the Ajax calls finish. class BufferedIO #:nodoc: internal use only def initialize (io) @io = io @read_timeout = 60 @continue_timeout = nil @debug_output = nil @rbuf = » end . . . . . def rbuf_fill beg
If you are working on shell most of the time Aliases are very helpfull and time saving. For testing purposes you can use Alias for getting ready your test suites. In this post, I want to explain both running Selenium and Capybara on console and creating aliases for each. This post is for Windows machines, if you are using Unix-like see this post . Creating Scripts for Selenium and Capybara First of all, it is assumed that you have installed Selenium and Capybara correctly and they work on your machines. If you haven’t installed, you can see my previous posts. I am using the Selenium with Python and the Capybara with Ruby. You can use several different language for Selenium but Capybara works only with Ruby. Create scripts in a directory called scripts (in your home folder, like as ~/scripts ) for your automation tool as following, save them as capybara.rb, sel.py : Creating Aliases Depends on your favourite shell, you need to add the alias to .bashrc bash
Page-object model is a pattern that you can apply it to develop efficient automation framework. With the page-model, it is possible to minimize maintenance cost. Basically page-object means that your every page is inherited from a base class which includes basic functionalities for every page. If you have some new functionalities that every page should have, you can simple add it to the base class. Base class is like the following: In this part we are creating pages which are inherited from base page. Every page has its own functionalities written as python functions. Some functions return to a new page, it means that these functions leave the current page and produce a new page. You should write as much as functions you need in the assertion part because this is the only part you can use the webdriver functions to interact with web pages . This part can be evaluate as providing data to assertion part. The last part is related to asserting your test cases against to the
For a successful Continuous Integration pipeline, there should be jobs for testing the performance of the application. It is necessary if the application is still performing well. Generally performance testing is thought as kinds of activities performed one step before going to live. In general approach it is true but don’t forget to test your application’s performance as soon as there is an testable software, such as an api end point, functions, and etc. For CI it is a good approach to testing performance after functional testing and just before the deployment of next stage. In this post, I want to share some info about Jenkins and Locust. In my previous post you can find some information about Locust and Jenkins. Jenkins operates the CI environment and Locust is a tool for performance testing. To run the Locust on Jenkins you need command line arguments which control the number of clients , hatch rate, running locust without web interface and there should be so
This topic has been deleted. Only users with topic management privileges can see it.
Saw a few old mentions (over a year), but nothing that answered my concern. I am trying to use Python + Selenium to automate Vivaldi. I have found some posts where people claim to have it working on Windows, but that is not an option for me. I’m working in an aws Linux 2 vm. Using Python 3.7 and selenium 3.141.0. Chromedriver 87 appears to be the correct one for the version of Vivaldi I downloaded today. From the posts I found, you have to add the binary location option, so my code looks like this:
chromedriverPath = "/usr/bin/chromedriver87"
session = requests.session()
headers = dict()
headers['User-agent'] = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36'
options = webdriver.ChromeOptions()
options.add_argument('disable-infobars')
options.add_argument('--start-maximized')
options.add_argument('--no-sandbox')
options.add_argument('test-type')
options.binary_location = r'/opt/vivaldi/vivaldi'
driver = webdriver.Chrome(executable_path=chromedriverPath, chrome_options=options)
testURL = r'http://www.google.com'
driver.get(testURL)
time.sleep(5)
I have left the other arguments in that I usually use when driving Chrome, but have also tried commenting them out.
Vivaldi works fine on my system.
But when I try to run it from Selenium, it does launch Vivaldi (which makes me suspect I’m close), but it comes up with «data:,» in the url window and eventually errors out with:
selenium.common.exceptions.WebDriverException: Message: unknown error: unable to discover open pages
Has anyone gotten this to work properly?
Hello @bjquinniii , I had a similar problem and was able to solve it , check my blog post maybe it’ll be useful for you .
https://mossab.hashnode.dev/linux-use-selenium-with-vivaldi-browser
@mossab Thanks for your interesting article!
I have not tested Vivaldi with Selenium yet, but i know it did not work in the past.
But as i know you can not test the Vivaldi UI with Selenium.
Hello @doctorg , thanks for your interest in my article.
with Vivaldi 4.1.2369 ( chrome 92.0.4515.134) and chromedriver 92 the unable to discover open pages
error is no longer observed — neither on Linux nor on Windows
@bjquinniii on Arch Linux everything is fine!
BUT you have to use AUR version!
version from pacman — not working at all, something wrong with chromedriver i suppose
@chombor said in Vivaldi and Selenium:
BUT you have to use AUR version!
And were is the repor for this Selenium version? Which packages are needed to get Selenium working with Vivaldi?
@doctorg in Arch Linux everything is bleeding edge, you silly 😏
@chombor <ironic> Oh, ok, Arch is Testing and Rolling Release every hour. Or a Compile-All-Yourself
@chombor said in Vivaldi and Selenium:
you silly
Oh, please, do not blame me, i am a innocent person, wont hurt you, Archibald. Hähähää
@chombor Thanks for the hint on Selenium, i will try next week to install and compile for a test.
@doctorg said in Vivaldi and Selenium:
@chombor <ironic> Oh, ok, Arch is Testing and Rolling Release every hour. Or a Compile-All-Yourself
don’t be so ironic — by default testing repos in pacman are off
@doctorg said in Vivaldi and Selenium:
@chombor Thanks for the hint on Selenium, i will try next week to install and compile for a test.
i’m new in web scraping, but i can tell you already that S. is pure crap..:
-
image_bytes = io.BytesIO(driver.get_screenshot_as_png())
function naming is just awful and misleading -
driver.get(i['url'])
Type of "get" is partially unknown Type of "get" is "(url: Unknown) -> None"Pylance
typing useless and awful too -
no async/await support
-
and official documentation is just… you get the idea..
lxml even worse btw..
i suggest you to use playwright — pure gold ! from M$ lol
top doc. top typing hints. top human design. top async performance.
Dean Blechman
unread,
Apr 27, 2016, 4:56:12 PM4/27/16
to Selenium Users
Hi
I have a Java script that runs tests automatically on a daily basis. I added a test that uses Selenium, and when it calls «WebDriver driver = new ChromeDriver()» it fails with the following error.
However when I run the test manually, the error does not reproduce.
Selenium version is 2.49.1, Chrome is up to date.
Any ideas what could be the problem?
27-04-2016 07:39:13 org.openqa.selenium.WebDriverException:unknown error: unable to discover open pages
(Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 63.87 seconds
Build info: version: ‘2.24.1’, revision: ‘17205’, time: ‘2012-06-19 16:53:24’
System info: os.name: ‘Windows Server 2008 R2’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_66’
Driver info: driver.version: ChromeDriver
Session ID: db858e0e720d15d82c6a4a9da6d90eef
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:422)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:188)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:472)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:155)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:107)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:165)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:107)
⇜Krishnan Mahadevan⇝
unread,
Apr 27, 2016, 4:58:22 PM4/27/16
to Selenium Users
Dean,
You are not on Selenium 2.49. Your stacktrace seems to suggest that you seem to be running on a very old version of Selenium [ Build info: version: ‘2.24.1’, revision: ‘17205’, time: ‘2012-06-19 16:53:24’ ]
Please upgrade to the latest version and try again.
Ripon Al Wasim
unread,
Apr 28, 2016, 7:50:48 AM4/28/16
to seleniu…@googlegroups.com
System.setProperty(«webdriver.chrome.driver», «D:\Ripon\chromedriver.exe»);
driver = new ChromeDriver();
Dean Blechman
unread,
May 1, 2016, 9:33:42 AM5/1/16
to Selenium Users
Wow. You’re right of course, I don’t know how I missed that. I’ll upgrade and see if that solves it.
Dean Blechman
unread,
May 2, 2016, 1:24:53 PM5/2/16
to Selenium Users
I updated Selenium, but got the same result.
02-05-2016 09:32:20 org.openqa.selenium.WebDriverException:unknown error: unable to discover open pages
(Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 61.86 seconds
Build info: version: ‘2.49.1’, revision: ‘808c23b0963853d375cbe54b90bbd052e2528a54’, time: ‘2016-01-21 09:37:52’
System info: host: ‘IP-0A00030F’, ip: ‘10.0.3.15’, os.name: ‘Windows Server 2008 R2’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_66’
Driver info: org.openqa.selenium.chrome.ChromeDriver
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:422)
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:678)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:159)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:116)
ajahar mohd
unread,
May 2, 2016, 6:29:01 PM5/2/16
to Selenium Users
Dean Blechman
unread,
May 3, 2016, 10:14:48 AM5/3/16
to Selenium Users
Thanks for answering Ajahar, but as you can see in the trace, the chromedriver is up to date.
David Ignjić
unread,
May 26, 2016, 9:50:17 PM5/26/16
to Selenium Users
Today happen also for me but just update chrome and java ;-/
David Ignjić
unread,
May 26, 2016, 9:55:06 PM5/26/16
to Selenium Users
SO i solved in that way that i change windows service to run on real user and then problem disapear.
Rajasekaran R
unread,
May 31, 2016, 12:31:06 PM5/31/16
to Selenium Users
I have found the solution for this issue. it is working fine for me. If you are using windows, run your Jenkins services in system admin, 1. open to run cmd 2. Enter service and click Okay button 3. A service dialog box open, locate Jenkins services. Go to properties of service 4. Go to logon tab, choose the second option. provide the your admin user not the local server 5. then restart the services. This will work
Shabana Parveen
unread,
Jun 6, 2016, 10:18:35 AM6/6/16
to Selenium Users
I tried all solution, but still getting same issue, please help.
⇜Krishnan Mahadevan⇝
unread,
Jun 6, 2016, 10:23:07 AM6/6/16
to Selenium Users
Shabana,
You haven’t told us much about what your setup looks like. So can you please add some context around the following aspects :
* What does your setup look like [ Include version info of ChromeDriver, chrome browser, selenium version, OS flavor and version ]
* How do you run a typical test on chrome. Please make sure you share code snippets etc.,
* What all have you tried so far.
Shabana Parveen
unread,
Jun 6, 2016, 10:34:59 AM6/6/16
to Selenium Users
Hi,
Thanks for quick reply, well I m using Maven project in which I mentioned latest selenium version dependency, Chrome version I m using chromedriver_win32.zip2016-06-04 20:51:192.61MB c5962f884bd58987b1ef0fa04c6a3ce5;
I used a BeforeSuit function, In which I mentioned below code:
System.setProperty(«webdriver.chrome.driver», «C://Users//f2849//AppData//Local//Google//Chrome//Application//chromedriver.exe»);
// System.setProperty(«webdriver.chrome.driver», «C://Program Files (x86)//Google//Chrome//Application//chromedriver.exe»);
driver = new ChromeDriver();
// driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);
driver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);
driver.manage().deleteAllCookies();
driver.manage().window().maximize();
Shabana Parveen
unread,
Jun 6, 2016, 10:37:18 AM6/6/16
to Selenium Users
Also, My project is perfectly working fine on local, but it showing error while I run my framework on Jenkins.
⇜Krishnan Mahadevan⇝
unread,
Jun 6, 2016, 10:43:13 AM6/6/16
to Selenium Users
Shabana,
This was why I was stating that you please add more context. Your code snippet suggests that you are trying to work with a Windows environment, but you say that you are trying to run on Jenkins.
Please add as much context as you can to describe your problem.
Shabana Parveen
unread,
Jun 6, 2016, 12:07:22 PM6/6/16
to Selenium Users
Basically,
I run my Maven project(which is configured via GitHub ) on Jenkins which is on Amazon cloud (Which provide Windows VM)
On Amazon Cloud, I have updated my ChromeDriver, Also I tried to Reset my Jenkins services.
Anything you required, Please let me know.
Thanks,
Shabana Parveen
Krishnan Mahadevan
unread,
Jun 6, 2016, 12:10:05 PM6/6/16
to Selenium Users
Rajasekaran R
unread,
Jun 6, 2016, 12:23:27 PM6/6/16
to Selenium Users
Hi All,
Please run you jenkins in administrator mode. This will solve your problem. I’m sure about it.
This problem occurs when jenkins installed in some VM (Remote) machines. because, that machine is not running on admin mode. It is running with local mode.
Switch that mode, will resolve this problem.
Thanks,
Raj R
Shabana Parveen
unread,
Jun 6, 2016, 12:23:49 PM6/6/16
to Selenium Users
Yes, manually Its working fine, doesn’t provide any stacktrack information. Below is error I got:
Starting ChromeDriver 2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b) on port 22509 Only local connections are allowed.Tests run: 502, Failures: 1, Errors: 0, Skipped: 501, Time elapsed: 65.255 sec <<< FAILURE! - in TestSuite test1_gotoSetUp(XXX_QA.FrontEndAutomation.Test_CP_BuySerive_withCredits) Time elapsed: 63.773 sec <<< FAILURE! org.openqa.selenium.WebDriverException: unknown error: unable to discover open pages (Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 60.95 seconds Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46' System info: host: 'XXXX', ip: 'XX.XX.XX.XX', os.name: 'Windows Server 2008 R2', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_40' Driver info: org.openqa.selenium.chrome.ChromeDriverResults : Failed tests: Test_CP_BuySerive_withCredits>Run.test1_gotoSetUp:95 » WebDriver unknown error... Tests run: 210, Failures: 1, Errors: 0, Skipped: 209
Shabana Parveen
unread,
Jun 6, 2016, 12:25:34 PM6/6/16
to Selenium Users
Its a 64 bit machine as well.
Shabana Parveen
unread,
Jun 6, 2016, 12:32:58 PM6/6/16
to Selenium Users
My project was perfectly working fine till yesterday, from today morning I got the error on Jenkins.
El miércoles, 27 de abril de 2016, 19:26:12 (UTC+5:30), Dean Blechman escribió:
Shabana Parveen
unread,
Jun 6, 2016, 3:11:39 PM6/6/16
to Selenium Users
Thanks Rajasekaran, Now its working after giving Administrative rights to Jenkins.
Ivan Trechyokas
unread,
Jun 7, 2016, 10:37:22 PM6/7/16
to Selenium Users
We also have same problems, but it depends on OS where test runs. We have Windows, and last Chrome driver and browser are used.
org.openqa.selenium.WebDriverException: unknown error: unable to discover open pages
(Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 61.05 seconds
Build info: version: ‘2.53.0’, revision: ’35ae25b1534ae328c771e0856c93e187490ca824′, time: ‘2016-03-15 10:43:46’
System info: host: ‘w10’, ip: ‘192.168.110.10’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_25’
Driver info: org.openqa.selenium.chrome.ChromeDriver
selenide.url: https://rc.semrush.net
selenide.baseUrl: https://rc.semrush.net
org.openqa.selenium.WebDriverException:
unknown error: unable to discover open pages
(Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 61.05 seconds
Build info: version: ‘2.53.0’, revision: ’35ae25b1534ae328c771e0856c93e187490ca824′, time: ‘2016-03-15 10:43:46’
System info: host: ‘w10’, ip: ‘192.168.110.10’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_25’
Driver info: org.openqa.selenium.chrome.ChromeDriver
selenide.url: https://rc.semrush.net
selenide.baseUrl: https://rc.semrush.net
at com.semrush.testSuits.BrowserManager.openBrowser(BrowserManager.java:19)
——- Stderr: ——-
SLF4J: Failed to load class «org.slf4j.impl.StaticLoggerBinder».
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Starting ChromeDriver 2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b) on port 44132
Only local connections are allowed.
For avoiding this problem we add this option for driver.
ChromeOptions options = new ChromeOptions();
options.addArguments(«no-sandbox»);
pawat…@gmail.com
unread,
Jun 10, 2016, 2:10:02 PM6/10/16
to Selenium Users
Thanks, Ivan Trechyokas.
Adding
capabilities: {
browserName: ‘chrome’,
chromeOptions: {
args: [‘—no-sandbox’]
},
to my Protractor configuration file solved the problem.
Soumya Balakrishnan
unread,
Jun 20, 2016, 9:46:42 PM6/20/16
to Selenium Users
Hey Shabana,
I have a very similar issue as you. I have the job running on one of windows slaves and I get this same error. But when I log into the slave and run the test it passes.
I wanted to check with you regarding what you meant by «its working after giving Administrative rights to Jenkins» -> how did you do that?
Thanks
Sindhu Kumar S
unread,
Jun 22, 2016, 9:12:52 AM6/22/16
to Selenium Users
What need to be done to make it work? Im on Win 7 running script via Jenkins CI.
If change running the Jenkins service in windows as Admin, then i cant lauch Jenkins via browser, receiving error 503.
qzhan…@gmail.com
unread,
Jun 29, 2016, 8:15:44 AM6/29/16
to Selenium Users
Hi All,
My problem is :when I start the tomcat using bintomcate7.exe, there is no error.But when I add tomcat to windows services, then start the tomcat service,the error message as bellow :
Caused by: org.openqa.selenium.WebDriverException: unknown error: unable to discover open pages
(Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.68 seconds
Build info: version: ‘2.48.2’, revision: ’41bccdd10cf2c0560f637404c2d96164b67d9d67′, time: ‘2015-10-09 13:08:06’
System info: host: ‘CDCH20120026-06’, ip: ‘10.60.201.20’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_77’
Driver info: org.openqa.selenium.chrome.ChromeDriver
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:647)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:247)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:142)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:159)
Sarvjeet Kumar Singh
unread,
Jul 5, 2016, 10:50:20 AM7/5/16
to Selenium Users
Hi Shabana,
I also have a very similar issue as you. My project runs fine from my local eclipse as maven project on both firefox and chrome. When i run from jenkin on firefox it works perfectly however on chrome it fails. I am using sellinium chrme driver 2.53.0 and maven 3.3. my repo is on bitbucket.
I wanted to check with you regarding what you meant by «its working after giving Administrative rights to Jenkins» -> how did you do that?
On Wednesday, April 27, 2016 at 7:26:12 PM UTC+5:30, Dean Blechman wrote:
Hi
I have a Java script that runs tests automatically on a daily basis. I added a test that uses Selenium, and when it calls «WebDriver driver = new ChromeDriver()» it fails with the following error.
However when I run the test manually, the error does not reproduce.
Selenium version is 2.49.1, Chrome is up to date.
Any ideas what could be the problem?
27-04-2016 07:39:13 org.openqa.selenium.WebDriverException:unknown error: unable to discover open pages
(Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 63.87 seconds
Build info: version: ‘2.24.1’, revision: ‘17205’, time: ‘2012-06-19 16:53:24’
System info: os.name: ‘Windows Server 2008 R2’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_66’
Driver info: driver.version: ChromeDriver
Session ID: db858e0e720d15d82c6a4a9da6d90eef
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
Sarvjeet Kumar Singh
unread,
Jul 9, 2016, 11:30:49 AM7/9/16
to Selenium Users
My problem is solved after adding chromeOptions.AddArguments(«no-sandbox»);
Thanks.
joan.s…@gttsupport.com
unread,
Jul 19, 2016, 7:14:05 PM7/19/16
to Selenium Users
That worked for me! Thanks!
niyaz hashmi
unread,
Jul 26, 2016, 3:00:43 PM7/26/16
to Selenium Users
Hi ,
I am facing the same issue the scripts are working fine on my local system but when the framework is running on Jenkins it is throwing «unknown error:Unable to discover open pages’.
Environment Details:
JDK: 1.8
Selenium:2.53.1
Chrome Browser:52.0
Chrome driver:2.21
Please tell me the resolution for this issue.
Regards,
Niyaz
Robins Mathew
unread,
Jul 26, 2016, 4:31:16 PM7/26/16
to Selenium Users
I faced the same issue.
Revert your chrome version to 51. It will resolve the issue for the time being.
Something went wrong with the release of Google Chrome 52
robert…@ambab.com
unread,
Jul 26, 2016, 4:43:34 PM7/26/16
to Selenium Users
Add this in your script. It will solve the issue that your facing.
ChromeOptions options = new ChromeOptions();
options.addArguments(«no-sandbox»);
Like this:
if (strBrowserType[i].toString().equalsIgnoreCase(«chrome»)) {
System.setProperty(«webdriver.chrome.driver», strBrowserPath[i]+»Drivers/chromedriver.exe»);
ChromeOptions options = new ChromeOptions();
options.addArguments(«no-sandbox»);
driver = new ChromeDriver();
If you have any more doubt’s you can ping me here itself. I’ll be more then happy to help
Robins Mathew
unread,
Jul 26, 2016, 4:48:11 PM7/26/16
to Selenium Users
Hi Robert,
Do you have any idea what does «no-sandbox» means exactly?
What can be the reason for this to happen in the new version of chrome?
Is it advisable to use «no-sandbox»?
What i have seen is
allow-no-sandbox-job | Enables the sandboxed processes to run without a job object assigned to them. This flag is required to allow Chrome to run in RemoteApps or Citrix. This flag can reduce the security of the sandboxed processes and allow them to do certain API calls like shut down Windows or access the clipboard. Also we lose the chance to kill some processes until the outer job that owns them finishes. ↪ |
Shabana Parveen
unread,
Aug 9, 2016, 8:19:42 AM8/9/16
to Selenium Users
On Tuesday, July 5, 2016 at 1:20:20 PM UTC+5:30, Sarvjeet Kumar Singh wrote:
Sarvjeet Kumar Singh
unread,
Aug 9, 2016, 8:37:17 AM8/9/16
to seleniu…@googlegroups.com
Thanks Shabana for the help. Appreciate it.
Priya Kharb
unread,
Aug 9, 2016, 9:34:38 AM8/9/16
to Selenium Users
Hello Sarvjeet,
I tried below mentioned solution but still i am facing same issue:
1. I have updated ChromeDriver exe.
2. Add below code snippet:
ChromeOptions options = new ChromeOptions();
options.addArguments(«test-type»);
options.addArguments(«start-maximized»);
options.addArguments(«—disable-extensions»);
options.addArguments(«no-sandbox»);
3. Also provide admin permission to Jenkins Service,I access Jenkin remotely.
Logs:
Running XXXXSuiteStarting ChromeDriver 2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b) on port 22600 Only local connections are allowed.Tests run: 494, Failures: 1, Errors: 0, Skipped: 493, Time elapsed: 66.093 sec <<< FAILURE! - in TestSuite test1_XXX Time elapsed: 64.381 sec <<< FAILURE! org.openqa.selenium.WebDriverException: unknown error: unable to discover open pages (Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 60.92 seconds Build info: version: 'unknown', revision: '31c43c8', time: '2016-08-02 21:57:56 -0700' System info: host: 'XXX', ip: '10.130.94.20', os.name: 'Windows Server 2008 R2', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_40' Driver info: org.openqa.selenium.chrome.ChromeDriverResults : Failed tests: Test_XXX » WebDriver unknown erro... Tests run: 206, Failures: 1, Errors: 0, Skipped: 205Thanks,Priya Kharb
Sarvjeet Kumar Singh
unread,
Aug 9, 2016, 9:46:39 AM8/9/16
to seleniu…@googlegroups.com
@Priya, Can you try adding below code as well and check.
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
options.addArguments(«ignore-certificate-errors»);
options.addArguments(«—allow-running-insecure-content»);
capabilities.setCapability(«chrome.binary», chromeDriverPath);
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
Priya Kharb
unread,
Aug 9, 2016, 12:08:19 PM8/9/16
to Selenium Users
@Sarvjeet,
Thank you so much for quick reply.
It woks for me…:-)
Thanks,
Priya Kharb
Sarvjeet Kumar Singh
unread,
Aug 9, 2016, 12:15:11 PM8/9/16
to seleniu…@googlegroups.com
You welcome Priya Great to know that it worked.
Cameron Spencer
unread,
Aug 15, 2016, 7:38:40 PM8/15/16
to Selenium Users
Hey, I seem to have the same issue but none of the steps in this thread have worked for me. As previously mentioned, this is only an issue when I try to run the commands through Jenkins
Jenkins 2.16
Windows 7 x64
Chrome Driver 2.23.409699
Selenium 2.53.1
Java 1.8.0_60
Here are my current Chrome driver options
ChromeOptions options = new ChromeOptions();
options.addArguments("test-type");
options.addArguments("start-maximized");
options.addArguments("--disable-extensions");
options.addArguments("no-sandbox");
options.addArguments("ignore-certificate-errors");
options.addArguments("--allow-running-insecure-content");
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability("chrome.binary", WINDOWS_CHROME_DRIVER);
capabilities.setCapability(ChromeOptions.CAPABILITY, options);WebDriver driver = new ChromeDriver();
The command I use
mvn exec:java -Dexec.args="%RESULT_DIR%"
OUTPUT:
Starting ChromeDriver 2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129) on port 30083 Only local connections are allowed. [WARNING] java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293) at java.lang.Thread.run(Thread.java:745) Caused by: org.openqa.selenium.WebDriverException: unknown error: unable to discover open pages (Driver info: chromedriver=2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 60.71 seconds Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09' System info: host: 'td-beefcake', ip: '192.168.214.43', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_60' Driver info: org.openqa.selenium.chrome.ChromeDriver 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:422) 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:678) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144) at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170) at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:159) at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:116)
Cameron Spencer
unread,
Aug 15, 2016, 8:09:04 PM8/15/16
to Selenium Users
Now I get to look silly. My problem was resolved when I realized I never passed in ‘options’to the ChromeDriver constructor.
WebDriver driver = new ChromeDriver(options);
PePan
unread,
Aug 16, 2016, 6:39:57 PM8/16/16
to Selenium Users
Hi,
I got to very same issue. After the Chrome has upgraded to v52, my Selenium tests started to fail. I have been using chromedriver 2.21 on Windows and my Jenkins was already running under a local (non-admin) user. I tried all the suggested tricks here — upgraded chromedriver to 2.23; restarted Jenkins service under local Administrator account; nothing helped. Finally, this only change helped:
In my Selenium test, I’ve changed this method
private static WebDriver driver;
@BeforeClass
public static void openBrowser() {
driver = new ChromeDriver();
driver.get(BASE_URL);
}
into
private static WebDriver driver;
@BeforeClass
public static void openBrowser() {
ChromeOptions options = new ChromeOptions();
options.addArguments("no-sandbox");
driver = new ChromeDriver(options);
driver.get(BASE_URL);
}
And that helped. I have no clue why this is happening.
Thanks Ivan and Cameron!
Petr
Srujan Kumar
unread,
Oct 14, 2017, 8:32:05 AM10/14/17
to Selenium Users
Thanks a lot!!!!
This worked for me and saved a lot of thime