if the user opens 4 tabs, how can my code find out which tab is currently open for the user to switch to that tab? The codes I use for this work:
private void Timer1_Tick_1(object sender, EventArgs e)
{
int a = driver.WindowHandles.Count();
foreach (var handle in driver.WindowHandles)
{
int test = driver.WindowHandles.IndexOf(handle);
which = // which tab active until the switchto it???
driver.SwitchTo().Window(driver.WindowHandles[which]);
}
}