When we are testing a hybrid application we will have main two types of windows.
1.WEBVIEW
2.NATIVE_APP
So always keep in mind to switch between the relevant window when you perform the correct task or action.
eg:
driver.SwitchTo().Window("WEBVIEW")
driver.SwitchTo().Window("NATIVE_APP")
Some times you might have to deal with one native app and more than 1 webviews .
So get the web view names by below code and switch to the correct window.
ReadOnlyCollection<string> windowHandles = InitialiseAppium.driver.WindowHandles;
driver.SwitchTo().Window(windowHandles[1]);
1.WEBVIEW
2.NATIVE_APP
So always keep in mind to switch between the relevant window when you perform the correct task or action.
eg:
driver.SwitchTo().Window("WEBVIEW")
driver.SwitchTo().Window("NATIVE_APP")
Some times you might have to deal with one native app and more than 1 webviews .
So get the web view names by below code and switch to the correct window.
ReadOnlyCollection<string> windowHandles = InitialiseAppium.driver.WindowHandles;
driver.SwitchTo().Window(windowHandles[1]);
No comments:
Post a Comment