ERROR:ssl_client_socket_openssl.cc(1158)] handshake failed with ChromeDriver Chrome browser and Selenium

You get this error when the browser asks you to accept the certificate from a website. You can set to ignore these errors by default in order avoid these errors. For Chrome, you need to add –ignore-certificate-errors and –ignore-ssl-errors ChromeOptions() argument: options = webdriver.ChromeOptions() options.add_argument(‘–ignore-certificate-errors’) options.add_argument(‘–ignore-ssl-errors’) driver = webdriver.Chrome(chrome_options=options) For the Firefox, you need to … Read more

Selenium webdriver can’t click on a link outside the page

It is actually possible to scroll automatically to element. Although this is not a good solution in this case (there must be a way to get it working without scrolling) I will post it as a workaround. I hope someone will come up with better idea… public void scrollAndClick(By by) { WebElement element = driver.findElement(by); … Read more

I need to find an element in Selenium by CSS

Only using class names is not sufficient in your case. By.cssSelector(“.ban”) has 15 matching nodes By.cssSelector(“.hot”) has 11 matching nodes By.cssSelector(“.ban.hot”) has 5 matching nodes Therefore you need more restrictions to narrow it down. Option 1 and 2 below are available for CSS selector, 1 might be the one that suits your needs best. Option … Read more

Selenium headless: How to bypass Cloudflare detection using Selenium

Using the latest Google Chrome v96.0 if you retrive the useragent For the google-chrome browser the following user-agent is in use: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Where as for google-chrome-headless browser the following user-agent is in use: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/96.0.4664.110 … Read more

what’s the relationship between Selenium RC and WebDriver?

You should probably start your research here (though you may have already gone over this): http://seleniumhq.org/docs/03_webdriver.html I’ll assume you’re contrasting Selenium-RC to WebDriver, Selenium-IDE really isn’t in the same ballpark. Selenium uses JavaScript to automate web pages. This lets it interact very tightly with web content, and was one of the first automation tools to … Read more

In Java, best way to check if Selenium WebDriver has quit

If quit() has been called, driver.toString() returns null: >>> FirefoxDriver: firefox on XP (null)) Otherwise, it returns a hashcode of the object: >>> FirefoxDriver: firefox on XP (9f897f52-3a13-40d4-800b-7dec26a0c84d) so you could check for null when assigning a boolean: boolean hasQuit = driver.toString().contains(“(null)”);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)