driver.get()不适用于Bluestack中的Android Native浏览器

时间:2015-01-07 21:34:54

标签: appium android-browser bluestacks

以下是我正在使用的所需功能

 DesiredCapabilities capabilities = new DesiredCapabilities();
 capabilities.setCapability(CapabilityType.BROWSER_NAME, "Browser");
 capabilities.setCapability("automationName","Appium");
 capabilities.setCapability("platformName", "Android");
 //capabilities.setCapability("avd","firstavd");
 capabilities.setCapability("deviceName", "Android Emulator");
 driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

当我执行以下代码时 - 使用上面所需的上限

  driver.navigate().to(url);
  driver.findElementByLinkText("Start").click(); 

它在其他avd中工作得非常好。启动浏览器并加载URL。但是在bluestacks中我得到以下例外:

org.openqa.selenium.NoSuchWindowException: A request to switch to a different window could not be satisfied because the window could not be found.

Appium server:  info: [debug] Responding to client with error: {"status":23,"value":{"message":"A request to switch to a different window could not be satisfied because the window could not be found.","origValue":"no such window: window was already closed\n  (Session info: webview=)\n  (Driver info: chromedriver=2.10.267521,platform=Windows NT 6.1 SP1 x86_64)"},"sessionId":"ba7131af61cad9451da99dd750d61fa8"}

出了什么问题。我不是想切换任何窗口。我哪里错了?

1 个答案:

答案 0 :(得分:0)

不确定问题究竟在哪里。但请看这个http://appium.io/slate/en/v1.3.4/?java#about-appium。 appium不支持Linktext和partiallinktext。