I am writing scripts to automate a hybrid application. On my app I have two windowHandles.
For example, after performing some actions when I execute below code I get "2" windows as the windowHandles value.
ReadOnlyCollection<string> windowHandles = InitialiseAppium.driver.WindowHandles;
So at the script I need to close the windowHandles[1] window and navigate back to 0th window.
I tried doing this with:
driver.close();
driver.Navigate().Back();
But no luck yet:
_+_+_+_+_+_+_+_+__+
This is what i currently have:
ReadOnlyCollection<string> windowHandles = InitialiseAppium.driver.WindowHandles;
InitialiseAppium.driver.SwitchTo().Window(windowHandles[0]);
InitialiseAppium.driver.Close();
Not working.