I need to make the webdriver navigate between open windows. I've tried: this.chromeDriver.SwitchTo().Window(chromeDriver.WindowHandles.Last());
but I can not use Last ().
Is there any missing?
Try to include:
using System.Linq;
Try to identify the window you need using:
foreach (var handle in driver.WindowHandles)
{
driver.SwitchTo().Window(handle);
}
After discovering the window, you can arrive at it like this:
driver.SwitchTo().Window(driver.WindowHandles[1]);