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 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.



Source link https://sqa.stackexchange.com/questions/23169/close-a-one--at-the-

LEAVE A REPLY

Please enter your comment!
Please enter your name here