I'm using Selenium with chromedriver to scrape a list of data using HTML agility pack but when I try to navigate to this page, the url gets changed from url1 to url2. Therefore is there a way to stop this from happening?
string url = "";
Console.WriteLine("Web Crawler!");
Console.WriteLine("Enter URL :");
url = Console.ReadLine();
Console.WriteLine("Entered URL :" + url);
// selenium section
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.AddUserProfilePreference("profile.default_content_setting_values.geolocation", 2);
IWebDriver driver = new ChromeDriver(".", chromeOptions);
driver.Navigate().GoToUrl(url);