Selenium: WebDriverException:Chrome failed to start: crashed as google-chrome is no longer running so ChromeDriver is assuming that Chrome has crashed

Try to download HERE and use this latest chrome driver version: https://sites.google.com/chromium.org/driver/ Try this: from selenium import webdriver from selenium.webdriver.chrome.options import Options chrome_options = Options() chrome_options.add_argument(‘–headless’) chrome_options.add_argument(‘–no-sandbox’) chrome_options.add_argument(‘–disable-dev-shm-usage’) d = webdriver.Chrome(‘/home/<user>/chromedriver’,chrome_options=chrome_options) d.get(‘https://www.google.nl/’)

C# Selenium ‘ExpectedConditions is obsolete’

How to resolve this with the latest version of Selenium. Using NuGet, search for DotNetSeleniumExtras.WaitHelpers, and import that namespace into your class. Now you can do this: var wait = new WebDriverWait(driver, new TimeSpan(0, 0, 30)); var element = wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementIsVisible(By.Id(“content-section”))); And the warning in the IDE will be gone.

selenium with scrapy for dynamic page

It really depends on how do you need to scrape the site and how and what data do you want to get. Here’s an example how you can follow pagination on ebay using Scrapy+Selenium: import scrapy from selenium import webdriver class ProductSpider(scrapy.Spider): name = “product_spider” allowed_domains = [‘ebay.com’] start_urls = [‘http://www.ebay.com/sch/i.html?_odkw=books&_osacat=0&_trksid=p2045573.m570.l1313.TR0.TRC0.Xpython&_nkw=python&_sacat=0&_from=R40’] def __init__(self): self.driver = … Read more

What is the difference between a CSS and XPath selector? And which is better with respect to performance for cross-browser testing?

CSS selectors perform far better than XPath selectors, and it is well documented in Selenium community. Here are some reasons: XPath engines are different in each browser, hence making them inconsistent Internet Explorer does not have a native XPath engine, and therefore Selenium injects its own XPath engine for compatibility of its API. Hence we … Read more

Selenium: FirefoxProfile exception Can’t load the profile

Update: Selenium team fixed in latest version. For almost all environments the fix is: pip install -U selenium Unclear at which version it was fixed (apparently r13122), but certainly by 2.26.0 (current at time of update) it is fixed. This error means that _wait_until_connectable is timing out, because for some reason, the code cannot connect … Read more

Selenium Web Driver & Java. Element is not clickable at point (x, y). Other element would receive the click

WebDriverException: Element is not clickable at point (x, y) This is a typical org.openqa.selenium.WebDriverException which extends java.lang.RuntimeException. The fields of this exception are : BASE_SUPPORT_URL : protected static final java.lang.String BASE_SUPPORT_URL DRIVER_INFO : public static final java.lang.String DRIVER_INFO SESSION_ID : public static final java.lang.String SESSION_ID About your individual usecase, the error tells it all : … Read more

Selenium Error – The HTTP request to the remote WebDriver timed out after 60 seconds

I had a similar issue using the Chrome driver (v2.23) / running the tests thru TeamCity. I was able to fix the issue by adding the “no-sandbox” flag to the Chrome options: var options = new ChromeOptions(); options.AddArgument(“no-sandbox”); I’m not sure if there is a similar option for the FF driver. From what I understand … Read more

Running Selenium with Headless Chrome Webdriver

To run chrome-headless just add –headless via chrome_options.add_argument, i.e.: from selenium import webdriver from selenium.webdriver.chrome.options import Options chrome_options = Options() #chrome_options.add_argument(“–disable-extensions”) #chrome_options.add_argument(“–disable-gpu”) #chrome_options.add_argument(“–no-sandbox”) # linux only chrome_options.add_argument(“–headless”) # chrome_options.headless = True # also works driver = webdriver.Chrome(options=chrome_options) start_url = “https://duckgo.com” driver.get(start_url) print(driver.page_source.encode(“utf-8”)) # b'<!DOCTYPE html><html xmlns=”http://www…. driver.quit() So my thought is that running it with … Read more