When I run my script on Ebay, I am detected as a bot.
I try to add chromeopcions but I have no successful result.
Any idea how to overcome this? HELP !!!!!
package Tests.Suite_PuzzlesTesting.Recompensas.Ebay;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import java.util.Collections;
public class TestBot {
public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.chrome.driver","src/main/resources/Driver/chromedriver");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--no-sandbox");
chromeOptions.addArguments("--disable-dev-shm-usage");
chromeOptions.addArguments("--disable-blink-features=AutomationControlled");
chromeOptions.setExperimentalOption("excludeSwitches", Collections.singletonList("enable-automation"));
chromeOptions.addArguments("window-size=1920,1080");
chromeOptions.addArguments("disable-infobars");
chromeOptions.addArguments("--disable-gpu");
chromeOptions.addArguments("--disable-gpu-sandbox");
chromeOptions.addArguments("--disable-dev-shm-usage");
chromeOptions.addArguments("--disable-blink-features");
chromeOptions.addArguments("--disable-blink-features=AutomationControlled");
chromeOptions.addArguments("user-agent=Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36");
ChromeDriver driver = new ChromeDriver(chromeOptions);
driver.manage().window().maximize();
driver.get("https://www.ebay.com/signin/");
Thread.sleep(99999999);
}
}