WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH while setting UserAgent through Selenium Chromedriver python

This error message… selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH …implies that the ChromeDriver was not found within the locations specified within PATH variable within Environment Variables. Solution You need to pass the Key executable_path along with the Value referring to the absolute path of the ChromeDriver along with the ChromeOptions object as … Read more

WebDriverWait is not waiting for the element I specify

As an alternative you can induce WebDriverWait for the ElementIsVisible() and you can use the following Locator Strategy: string messageText = new WebDriverWait(driver, TimeSpan.FromSeconds(30)).Until(ExpectedConditions.ElementIsVisible(By.ClassName(“block-ui-message”))).GetAttribute(“innerHTML”); Using DotNetSeleniumExtras.WaitHelpers with nuget: Not that super clear what exactly you meant by specific using directive I need. In-case you are using SeleniumExtras and WaitHelpers you can use the following solution: … Read more

How to inspect element for Selenium v3.6 as FireBug is not an option any more for FF 56?

If you visit the GitHub Page of FirePath, it clearly mentions that : FirePath is a Firebug extension that adds a development tool to edit, inspect and generate XPath expressions and CSS3 Selectors Now if you visit the Home Page of FireBug, it clearly mentions that : The Firebug extension isn’t being developed or maintained … Read more

Error Message: ‘chromedriver’ executable needs to be PATH

While working with Selenium v3.x, ChromeDriver and Chrome Browser you may need to pass the argument executable_path along with the absolute path of the ChromeDriver binary through either of the following options: Double back slashes i.e. (\\) Single back slash i.e (\) along with the raw (r) switch. Binary extension i.e. (.exe) So you have … Read more

Message: Element could not be scrolled into view while trying to click on an option within a dropdown menu through Selenium

This error message… selenium.common.exceptions.ElementNotInteractableException: Message: Element <option> could not be scrolled into view. …implies that the <option> item which your program was trying to interact with could not be scrolled into view. The HTML of the desired element would have given us some idea behind the error. However it seems the desired element was not … Read more

Unable to import org.openqa.selenium.WebDriver using Selenium and Java 11

As per Can’t compile Java9 module with selenium-java as dependency it seems the Selenium packages can’t be compiled with Java 9 due to split packages and till May 15, 2018 Selenium wasn’t fully compatible with Java 9. But as per this comment @Jarob22 mentioned, Selenium works just fine using Java 10. Java 9 is already … Read more

Unable to use Selenium to automate Chase site login

I took your code and simplified the structure and ran the test with minimal lines of code as follows: from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait options = webdriver.ChromeOptions() options.add_argument(“start-maximized”) options.add_argument(“–disable-extensions”) driver = webdriver.Chrome(chrome_options=options, executable_path=r’C:\Utility\BrowserDrivers\chromedriver.exe’) driver.get(“https://secure07c.chase.com/web/auth/#/logon/logon/chaseOnline?”) WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, “input.jpui.input.logon-xs-toggle.clientSideError”))).send_keys(“jsmiao”) driver.find_element_by_css_selector(“input.jpui.input.logon-xs-toggle#password-input-field”).send_keys(“hello”) driver.find_element_by_css_selector(“button#signin-button>span.label”).click() Similarly, as per … Read more

InvalidArgumentException: Message: invalid argument: user data directory is already in use error using –user-data-dir to start Chrome using Selenium

This error message… selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: user data directory is already in use, please specify a unique value for –user-data-dir argument, or don’t use –user-data-dir …implies that the ChromeDriver was unable to initiate the new Chrome Browser session using the specified user data directory as it was already in use. This error can be … Read more

WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127

It seems chromedriver needs some extra libraries. This solved the issue for me: apt-get install -y libglib2.0-0=2.50.3-2 \ libnss3=2:3.26.2-1.1+deb9u1 \ libgconf-2-4=3.2.6-4+b1 \ libfontconfig1=2.11.0-6.7+b1 I was working on a similar setup using a docker container instead of a server/VM without X / GUI. To figure out which dependencies are required I tried iteratively to run it … Read more