Is it possible to find out the url of the active tab using Selenium WebDriver? The browser before running the program should already be open, and not cause
ChromeDriver chrome = new ChromeDriver(); Here's the code that searches for active tabs without the help of Selenium WebDriver
var roots = AutomationElement.RootElement.FindAll(TreeScope.Children, new PropertyCondition(AutomationElement.ClassNameProperty, "Chrome_WidgetWin_1")); foreach (AutomationElement root in roots) { var textP = root.FindFirst(TreeScope.Descendants, new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Edit)); var vpi = textP.GetCurrentPropertyValue(ValuePatternIdentifiers.ValueProperty); Console.WriteLine(vpi); } But he is very actively loading the CPU. And with the help of Selenium WebDriver, I still did not understand how to find the link for the active tab of an already running browser. And generally it can be done with the help of Selenium WebDriver?
UPD
Well, or somehow you can adapt the method with Autmation