Not able to identify element in WEBVIEW in iOS hyprid app automation using Appium on real device

后端 未结 3 612
故里飘歌
故里飘歌 2021-01-15 17:45

I was trying to automate the hybrid app build using ionic2/Angular2 and typescript.

I am using C# for code writing. test are in BDD - specflow Versions: iOS:9.3.1 Xc

3条回答
  •  执念已碎
    2021-01-15 18:24

    1. Continues of from here : How to enable and use WebView for iOS Automation in Appium

    Try and use the following code to switch contexts :

    var contextNames = driver.GetContexts(); //correction to your code 
    driver.SetContext(contextNames[1]);
    
    1. You don't necessarily need the following capability while using appium :

      capabilities.SetCapability("browserName", "iOS"); //can be removed from code as well
      
    2. I am guessing you might be trying to use Appium Inspector along with running/debugging your tests. In which case you might not be able to use both the instances. Please look into the appium server logs for details on this.

提交回复
热议问题