2016-04-07 87 views
0

我試圖使用APPIUM自動化android應用程序,但它無法將上下文切換到Web視圖。 我發現具有Web視圖的活動具有流程屬性,我認爲這會導致問題。 爲了證明這一點,我創建了簡單的應用程序。一個有進程屬性,另一個沒有。Appium切換上下文到Web視圖

我使用APPIUM GUI 1.4.13和鉻驅動2.21

任何人能指教?

失敗的日誌:

info: Chromedriver: Changed state to 'stopped' 

error: Chromedriver: Chromedriver exited unexpectedly with code null, signal SIGTERM 

warn: Chromedriver for context WEBVIEW_com.linecorp.appiumwebviewsample:account stopped unexpectedly 
warn: Chromedriver quit unexpectedly, but it wasn't the active context, ignoring 

error: Chromedriver: Error: An error occurred (Original error: chrome not reachable 
    (Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Mac OS X 10.11.4 x86_64)) 
    at JWProxy.command$ (lib/proxy.js:149:15) 
    at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-chromedriver/node_modules/babel-runtime/regenerator/runtime.js:67:40) 
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-chromedriver/node_modules/babel-runtime/regenerator/runtime.js:294:22) 
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-chromedriver/node_modules/babel-runtime/regenerator/runtime.js:100:21) 
    at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-chromedriver/node_modules/babel-runtime/regenerator/runtime.js:136:37) 
    at bound (domain.js:254:14) 
    at GeneratorFunctionPrototype.runBound (domain.js:267:12) 
    at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-chromedriver/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:89:39) 
    at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-chromedriver/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:100:28 
    at process._tickDomainCallback (node.js:381:11) 
{ [Error: An error occurred (Original error: chrome not reachable 
    (Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Mac OS X 10.11.4 x86_64))] 
    status: 100, 
    value: { message: 'chrome not reachable\n (Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Mac OS X 10.11.4 x86_64)' }, 
    httpCode: 200 } 
+0

似乎是appium v​​s chrome-driver問題的另一個問題 – nullpointer

回答

0

時未設置的應用程序包所要求的功能,我可以找到類似的消息。
您是否使用com.android.chrome作爲appPackage?

+0

我將它設置爲我的android應用程序包。我應該把它設置爲鉻? –

+0

嘗試使用appPackage作爲com.android.chrome – hemanto

+0

沒有工作..... –