Ionic2/Angular2/Typescript でハイブリッド アプリ ビルドを起動した後、以下のコードを使用してコンテキストを変更しています。
var contextNames=driver.Contexts;
driver.Context= contextNames[1]; //changing context to WEBVIEW
driver.FindElementByXPath("locator").Click(); //getting error on this step
コンテキストを切り替えた後、Appiumインスペクターとサファリ開発ウィンドウからxpathを使用しようとしました
Appium Xpath = //UIAApplication 1 /UIAWindow 1 /UIAButton[2] Safari Xpath = //*[@placeholder='Username' and @class='ng-untouched ng-pristine ng-valid']
私はハイブリッドアプリに取り組んでいるので
1. I installed ios_webkit_debug_proxy on mac
2. Started the same on 27753 port
3. In machine's mac browser localhost:27753 gives the link
4. Clicked on the link which displays the elements of the webview app which is currently running on connected device
5. Took above safari xpath from here
使用されている機能とエラーに関連するスクリーンショットの詳細については、リンクに移動してください
取得エラー
info: [debug] [REMOTE] Executing 'find_element' atom in default context
info: [debug] [REMOTE] Sending javascript command
info: [debug] [REMOTE] Remote debugger data sent [{"method":"Runtime.evaluate","params":{"objectGroup":"console","includeCommandLineAPI":true,"doNotPauseOnExceptionsAndMuteConsole":true,"expression":"(function(){return function(){function h(a){return...]
info: [debug] [REMOTE] Debugger web socket received data: {"result":{"result":{"type":"string","value":"{\"status\":0,\"value\":null}"},"wasThrown":false},"id":53}
info: [debug] Waited for 29725ms so far