ChromeDriver with Selenium displays a blank page

Viewed 7102

I am using Selenium(Java) with Chrome to access the following website:

https://www.ebay-kleinanzeigen.de/m-einloggen.html?targetUrl=/

The Problem is that it always displays a blank page. Here is my Code:

ChromeOptions cap = new ChromeOptions();
cap.setBinary("C:\\Program Files (x86)\\Google\\Chrome Beta\\Application\\chrome.exe");

System.setProperty("webdriver.chrome.driver","C:\\Users\\Admin\\Downloads\\chromedriver_win32beta\\chromedriver.exe");
WebDriver driver=new ChromeDriver(cap);


driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

driver.manage().window().maximize();


    try {
        driver.get("https://www.ebay-kleinanzeigen.de/m-einloggen.html?targetUrl=/");

    }catch(Exception e){
        System.out.println(e);
    }

Every other website I have tried works just fine, but this one doesn't want to show up. I have tried to access this website from Firefox, Chrome and Edge, which also show a blank page. I am using Selenium(3.141.59), ChromeDriver(81.0.4044.20) and Chrome Beta(81.0.4044.62). Here is the HTML Code when I ispect the website:

Webpage is blank

3 Answers

It looks like this site can detect Selenium and do not open with it.

You can hide it using Chrome Options. Try adding arguments like this before openning the url:

ChromeOptions options = new ChromeOptions();
options.addArguments("disable-blink-features=AutomationControlled");
ChromeDriver driver = new ChromeDriver(options);

Hope this helped, good luck!

It works with selenium stealth and the following options

options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)

I experienced the same issue. Check if the page you requested returns a successful HTTP status code like 200. In my case, it returned a 40x error which resulted in a blank page.

Related