Safariはウェブサイトではなくappiumポートにナビゲートしていますか?
下のスクリプトの出力。アドレスバーには、googleを渡す代わりに通過するappiumポートがあります。
[OneTimeSetUp]
public void BeforeEachTest()
{
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.SetCapability("deviceName", "iPhone Simulator");
capabilities.SetCapability("platformName", "iOS");
capabilities.SetCapability("platformVersion", "11.1");
capabilities.SetCapability("browserName", "Safari");
capabilities.SetCapability("bundleId", "com.apple.mobilesafari");
capabilities.SetCapability("showXcodeLog", true);
driver = new IOSDriver<AppiumWebElement>(new Uri("http://127.0.0.1:4723/wd/hub"), capabilities, TimeSpan.FromSeconds(110));
driver.Manage().Timeouts().ImplicitWait = IMPLICIT_TIMEOUT_SEC;
}
[Test]
public void AppLaunches()
{
driver.Navigate().GoToUrl("http://www.google.com");
}
[OneTimeTearDown]
public void tearDown(){
driver.Quit();
}
私は必要なものにあなたの能力を制限してください
誰をdriver.getすることができます...私は、私はすでにこれを試みた自動化 –