I have seen a lot of questions around setting the language of the Browser. But is there a way to set the browser's search result region to a specific country while launching the chromedriver?
I have no idea where to start- so I have tried to set the language of the browser(by the below code) but that doesn't solve my problem.
System.setProperty(“webdriver.chrome.driver”,”D:/DollarArchive/chromedriver.exe”);
ChromeOptions options = new ChromeOptions();
options.addArguments(“–lang= sl”);
ChromeDriver driver = new ChromeDriver(options);
driver.get(“http://google.com");
I would need to know a way to set the region while initializing the ChromeDriver. When done manually -> Google -> Settings -> Search Setting -> Region Setting -> Select the desired country and Save.(as shown in the image below)
But I wouldn't want to do that process through the UI. Hence I wanted to find out if there was a way to do it by ChromeOptions
. Any thoughts?