selenium-chromedriver

Redirect_to sign in page if AJAX call is not authorized

て烟熏妆下的殇ゞ 提交于 2019-12-11 08:06:24
问题 I have a form and when you click submit it will make an AJAX call to update the thing you want to change. My user session expires in 4 hours, so if the user wants to update the form and his session has expired in the meantime it will render a flash message asking to reload the page and sign in again. When trying to test this behavior using Cucumber , Capybara , Selenium and Chrome the AJAX response is never received as the flash message is not rendered. (If I test it manually it works just

while testing the dropdown in the phptravels site with selenium python i came across the issue.that i cannot select the value from dropdown

一个人想着一个人 提交于 2019-12-11 07:58:16
问题 The values are only loaded when we search with more than 3 keywords. please help me to find a solution - my code is the following... depart = driver.find_element_by_xpath("//a[contains(@class, 'select2-choice select2-default')]") depart.click() depart.select_by_value('Delhi Indira Gandhi Intl (DEL)') 回答1: Here code you can try: from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait

Error running chromedriver

一曲冷凌霜 提交于 2019-12-11 07:55:36
问题 I get this error when i try to start chromedriver on debian lenny - ./chromedriver: /lib/libc.so.6: version GLIBC_2.11' not found (required by ./chromedriver) ./chromedriver: /lib/libc.so.6: version GLIBC_2.8' not found (required by ./chromedriver) ./chromedriver: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ./chromedriver) How do i get around this issue? Thanks in advance 回答1: Lenny has old libraries which google chrome does not support. So i moved to debian

Automation execution is too slow in chrome using selenium webdriver 36

[亡魂溺海] 提交于 2019-12-11 07:43:46
问题 Earlier I was using chrome 32 , which was very fast. But after upgrading to 36 , it is very slow. It is taking more than a second to execute sendKeys instruction even after location element. Any help would be appreciated. 回答1: The answer can be the following if you use 64-bit OS architecture on your PC - as far as I remember is because Selenium performs switching between 32-bit and 64-bit mode (which is very slow operation). ChromeDriver was supported only in 32-bit. I had same issues with IE

Selenium Python - Headless Chrome not copying to clipboard

半城伤御伤魂 提交于 2019-12-11 07:36:40
问题 I am doing a script to run Python Selenium and copy some content to clipboard. It has been working nice until I ran it in headless mode. Now it does not copy the text to the clipboard. Does anyone know how to solve this? Here it is my configuration options = webdriver.ChromeOptions() options.add_experimental_option("prefs", { "download.default_directory": indir, "download.prompt_for_download": False, "download.directory_upgrade": True, "safebrowsing.enabled": True}) options.add_argument('-

Why selenium is run in headless mode if a slave connected via SSH?

妖精的绣舞 提交于 2019-12-11 07:34:05
问题 I use Jenkins to run tests and connect a slave to it. Before I connected the slave using Java application and when I started build the tests were run visibly - I saw browser windows opening on the slave. Now I connect the same slave but using SSH and when I start build the tests are run but they run in headless mode so I don't see anything going on the slave (only in processes). I want to see the process of tests execution as I saw it when my slave was connected using Java. I use ChromeDriver

keep “Disable developer mode” closed while adding extension

孤人 提交于 2019-12-11 07:33:07
问题 I am using Java and Selenium to write a test. In order to prevent the download bar in Chrome I use: options.addExtensions(new File("Upload\\Disable-Download-Bar_v1.5.crx")); capabilities.setCapability(ChromeOptions.CAPABILITY, options); which works fine. The only issue is that at the start of the test it opens a popup window I used options.addArguments("chrome.switches","--disable-extensions"); to keep it closed but of course it prevented the extension and I had the download bar back. So how

Issues while implementing jenkins docker image+chrome+ruby unknown error: Chrome failed to start: crashed (Selenium::WebDriver::Error::UnknownError)

随声附和 提交于 2019-12-11 07:27:05
问题 I am trying to setup jenkins using the official jenkins docker image. Dockerfile FROM jenkins/jenkins:lts USER root RUN apt-get update && apt install -y ruby-full RUN apt-get install -y curl RUN apt -y autoremove RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - RUN apt-get install -y nodejs RUN apt-get install -y build-essential RUN apt install -y wget RUN gem install --no-ri --no-rdoc --format-executable rake RUN gem install selenium-webdriver RUN gem install bundler RUN npm

In Selenium how does ChromeDriver executable finds Chrome browser?

瘦欲@ 提交于 2019-12-11 07:05:11
问题 For Selenium, we define the chrome executable path in System.setProperty. When a URL is passed in driver.get and Chrome invokes: 1 - How does chrome executable know where Chrome browser is actually installed? 2 - What would happen if I do not have Chrome browser? Responses appreciated!! 回答1: As per the Requirements of ChromeDriver : The ChromeDriver consists of three separate pieces. There is the browser itself i.e. chrome , the language bindings provided by the Selenium project i.e. the

Exception: The path to the driver executable must be set by the webdriver.chrome.driver system property; with Remote WebDriver

…衆ロ難τιáo~ 提交于 2019-12-11 06:57:33
问题 When I modified my code to run with RemoteWebDriver and ChromeDriver I am getting: Exception: The path to the driver executable must be set by the webdriver.chrome.driver system property; Code: File file = new File("C:/WebDrivers/chromedriver.exe"); System.setProperty("webdriver.chrome.driver",file.getAbsolutePath()); HashMap<String, Object> chromePrefs = new HashMap<String, Object>(); chromePrefs.put("profile.default_content_settings.popups", 0); chromePrefs.put("download.default_directory",