selenium-chromedriver

org.openqa.selenium.SessionNotCreatedException: session not created exception from tab crashed error when executing from Jenkins CI server

孤街浪徒 提交于 2019-12-30 18:56:03
问题 I am trying to run my automation tests from Jenkins CI server (built with Gradle), but the browser crashes instantly with the error below. It also crashes when I run gradle test from the console. Now when I am running the same test from the IDE (Idea), everything works just fine. I run the exact same test file, in the exact same directory. Versions: Selenium: 3.11.0 Gradle: 4.6 TestNG: 6.14.2 Chrome: 65.0.3325.181 Chromedriver: 2.37 Anyone has any idea what could be causing this? org.openqa

Selenium C# Open New Tab CTRL+T Not working with CHROME

时光总嘲笑我的痴心妄想 提交于 2019-12-30 08:28:46
问题 static void Main() { IWebDriver driver = new ChromeDriver(); driver.Navigate().GoToUrl("http://google.com"); IWebElement body = driver.FindElement(By.TagName("body")); body.SendKeys(Keys.Control + "t"); } This is the code that I am trying to use to open a new tab and its not working, I am not getting any errors nothing, the driver opens Google and thats all.... I have searched a lot and found many tutorials even videos where people are using the exact same code and it works for them, but for

Selenium ChromeDriver does not recognize newly compiled Headless Chromium (Python)

自古美人都是妖i 提交于 2019-12-30 08:05:13
问题 I am trying to use the new (2016) headless version of Chromium with Selenium/ChromeDriver (In the past, I used Firefox with xfvb but this promises to be much better). I have compiled a headless version of Chromium from sources (I did not find any pre-built binaries) based on the instructions I found here and then I used the following code to launch it through Selenium: from selenium import webdriver from selenium.webdriver.chrome.options import Options l_option = Options() l_option.add

Not able to maximize Chrome Window in headless mode

╄→尐↘猪︶ㄣ 提交于 2019-12-30 03:56:06
问题 I recently upgraded my chrome version to 60 and chromedriver to version 2.31. Post that I have started getting the following exception when I try to do a maximize of the browser window. driver.driver.manage().window().maximize() org.openqa.selenium.WebDriverException: unknown error: failed to change window state to maximized, current state is normal (Session info: chrome=60.0.3112.78) (Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Linux 4.2.0-27

How do you start selenium using Chrome driver and all existing browser cookies?

醉酒当歌 提交于 2019-12-30 01:33:05
问题 From what I understand so far, Chrome Driver always starts without any stored browser cookies. I need the driver start with all the cookies stored by Chrome. I wonder if there is any way to start the driver with the cookies that are already stored? I'm using C# with .net 4.5. 回答1: Yes we can do it by invoking saved chrome profile just like firefox profile. below are steps i noted when i am doing bit back ago in Java, we can do it by using ChromeOptions and Chrome Profile. In chrome navigate

How to bypass Google captcha with Selenium and python?

别来无恙 提交于 2019-12-29 10:02:11
问题 I want to know how to bypass google captcha using selenium and python When i try to scrap something google give me captcha, can I bypass google captcha with selenium python. As an example it's google recaptha you can see this captcha via this link: https://www.google.com/recaptcha/api2/demo 回答1: To start with using Selenium's Python clients you should avoid solving/bypass google captcha. Selenium Selenium automates browsers. Now what you what to achieve with that power is entirely up to

How can I tell Selenium to press cancel on a print popup in Chrome 75?

房东的猫 提交于 2019-12-29 09:59:51
问题 I have been using the the suggested solution from : https://stackoverflow.com/a/41670021/4633408 And it worked perfectly since Chrome 71. executor.executeScript("document.querySelector(\"print-preview-app\").shadowRoot.querySelector(\"print-preview-header\").shadowRoot.querySelector(\"paper-button.cancel-button\").click();"); But it no longer works. Has anyone figured out a way to click, "Cancel" in the print preview for Chrome 75? I caught the exception and it simply says: e:org.openqa

“unknown error: cannot read property 'scrollleft' of null” in Chrome using selenium

限于喜欢 提交于 2019-12-29 09:55:46
问题 In Chrome when I am clicking button, I am getting "unknown error: cannot read property 'scrollleft' of null Their is 1 Input field in that page I am able to enter value in that only Button click is not working. This Click is working fine in Firefox. issue only in Chrome IWebElement element = wait.Until(d => d.FindElement(locator)); wait.Until(ExpectedConditions.ElementToBeClickable(element)); element.Click(); Note: There is no frames in this page, no scrolls. 回答1: You need to invoke Click()

Access and handle chrome extension popup using selenium webdriver

断了今生、忘了曾经 提交于 2019-12-29 09:32:37
问题 I am trying to install the IBM DAP chrome extension using Selenium webdriver. I don't have access to crx file. So, I tried to install it directly through the chrome web store for plugins as: browser = webdriver.Chrome() browser.get('https://chrome.google.com/webstore/detail/dynamic-assessment-plugin/fnapgcgphlfhecijolobjodbbnjjpdga') browser.maximize_window() browser.implicitly_wait(5) browser.find_element_by_css_selector("body > div.F-ia-k.S-ph.S-pb-qa > div.h-F-f-k.F-f-k > div > div > div.e

Access and handle chrome extension popup using selenium webdriver

做~自己de王妃 提交于 2019-12-29 09:32:11
问题 I am trying to install the IBM DAP chrome extension using Selenium webdriver. I don't have access to crx file. So, I tried to install it directly through the chrome web store for plugins as: browser = webdriver.Chrome() browser.get('https://chrome.google.com/webstore/detail/dynamic-assessment-plugin/fnapgcgphlfhecijolobjodbbnjjpdga') browser.maximize_window() browser.implicitly_wait(5) browser.find_element_by_css_selector("body > div.F-ia-k.S-ph.S-pb-qa > div.h-F-f-k.F-f-k > div > div > div.e