selenium-chromedriver

“Save password for this website” dialog with ChromeDriver, despite numerous command line switches trying to supress such popups

萝らか妹 提交于 2019-12-10 13:28:34
问题 I am getting the "save password" dialog when creating a ChromeDriver like this: var options = new ChromeOptions(); options.AddArguments("chrome.switches", "--disable-extensions --disable-extensions-file-access-check --disable-extensions-http-throttling --disable-infobars --enable-automation --start-maximized"); var driver = new ChromeDriver(options); And navigates to a login form and submit it. How do I get rid of the popup? 回答1: You need to add these preferences: options

selenium chrome driver httplib.badstatusline

北城以北 提交于 2019-12-10 13:17:14
问题 I install selenium, chrome, pyvritualdisplay and xvfb using the following tutorial: https://christopher.su/2015/selenium-chromedriver-ubuntu/ when i try to run a python selenium script i get this error when i call webdriver.Chrome() I'm using python2.7.6 on Ubuntu 14.04.3 LTS Traceback (most recent call last): File "selenium_python_unittests/attempt_50.py", line 9, in <module> driver = webdriver.Chrome() File "/home/sele/headless/local/lib/python2.7/site-packages/selenium/webdriver/chrome

get StaleElementReferenceException error while using driver.navigate().back() in a loop in selenium

无人久伴 提交于 2019-12-10 12:19:58
问题 I have the following code, which gets a list of elements and then loops through it while using driver.navigate().back(); List<WebElement> listingWebElementList = driver.findElements(By.xpath("(//span[@id='titletextonly'])")); for (WebElement listingElement : listingWebElementList) { Thread.sleep(5000); listingElement.click(); Thread.sleep(5000); driver.navigate().back(); } On the second round of the loop I get the following error when using the chromedriver org.openqa.selenium

Grabbing Locator Index Automatically

断了今生、忘了曾经 提交于 2019-12-10 12:16:12
问题 I'm going to try to explain this the best I can without making it too complicated. Currently I have a program which automatically grabs an element's locator (id, css, xpath) when I click on an element on a page. The problem is, the element's css (ID, class name, etc) that I am grabbing is not unique (I cannot change the website) I know in chrome, when I type $$('#test'), it will bring me a list of locators with ID 'test'. From there I know I could manually find the index of the element.

How to wait for page to load completely using JavaScript in Selenium

早过忘川 提交于 2019-12-10 11:59:46
问题 I'm trying get for page to load completely before doing an action. I don't want to start an action while loading circle on the browser tab is still turning. My wait for ajax function is not working for some cases, especially for new page loading. My function is JQuery based: JavascriptExecutor jsDriver = (JavascriptExecutor) webDriver; boolean stillRunningAjax = (Boolean) jsDriver .executeScript("return window.jQuery != undefined && jQuery.active != 0"); return !stillRunningAjax; if that

Mocha unable to run with Nightwatch

人盡茶涼 提交于 2019-12-10 11:44:30
问题 I'm running mocha with nighwatch.js, selenium and chromedriver I'm able to run with describe, and it, but I'm making a dynamic tests, so I need use the following way to invoke, but I'm unable to get mocha running this way with nightwatch "use strict"; var nightwatch = require('nightwatch'); var Mocha = require('mocha'); var Test = Mocha.Test; var Suite = Mocha.Suite; var mocha = new Mocha(); var suite = Suite.create(mocha.suite, 'Search Box'); suite.addTest(new Test('I\'m a dynamic test',

Element must be user-editable in order to clear it (Behat)

左心房为你撑大大i 提交于 2019-12-10 11:27:55
问题 I am automating a website using the Behat framework, working in PHPStorm, have the latest chromedriver and selenium jar up and running: I cant seem to interact with standard Date fields across the site e.g: input type="date" ng-show="options.editEnabled" Feature file: Then I select a start date of "01012014" public function startDate ($date) { $this->getElement('startDate')->setValue($date); } Returns an error of invalid element state: Element must be user-editable in order to clear it. I

How to use Selenium on Colaboratory Google?

↘锁芯ラ 提交于 2019-12-10 09:43:22
问题 I scraping many info from web, and I hope it works on cloud. So I'd like to use colaboratory, but it turned error WebDriverException Traceback (most recent call last) <ipython-input-35-abcc3b93dfa7> in <module>() 20 options.add_argument("--start-maximized"); 21 options.add_argument("--headless"); ---> 22 driver = webdriver.Chrome('chromedriver', chrome_options=options) 23 24 book = cd + "/target.xlsx" /usr/local/lib/python3.6/dist-packages/selenium/webdriver/chrome/webdriver.py in __init__

Selenium ChromeDriver - Run in background but not headless

▼魔方 西西 提交于 2019-12-10 08:47:23
问题 I am looking for a way to run selenium tests with a chrome driver, in the background. With the background I mean as in, not the foreground focussed window. I can actually do this, but as soon as actions like opening a new tab or switching between windows (so basically switching window handles) happen in the chrome driver, the browser window gets pushed to the foreground. So my question is, how can I prevent this from happening without running the test headless? Any suggestions are appreciated

Python Selenium Send Keys Giving Warning about size

£可爱£侵袭症+ 提交于 2019-12-10 03:36:48
问题 I'm uploading content through python selenium binding element.send_keys(content) , but I get a content size error. My data will grow bigger. Can you please give me a solution through which I can append the selected element in chunks rather than putting the complete and entire data to my selected field where I want to enter data? I mean I want to put data to the selected element in chunks rather than putting it in in a single action. By getting this kind of error, seems not good for my system