How Can I Go To The Given Url In Mobile Chrome Browser Using C# And Appium On Real Device?
I'm automating mobile web testing on Android real device with Appium and c#. I've seen that there is get method in Java that allows navigation to the given URL, for example: Desir
Solution 1:
Try this :
driver.sendKeys(URL);
Solution 2:
The answer could be found via Object Browser (this is what I did). The analogue of Java code looks like:
_navigation = _driver.Navigate();
_navigation.GoToUrl(@"http://stackoverflow.com");
So the full listing will become this:
publicvoidInitializeDriver()
{
Console.WriteLine("Connecting to Appium server");
_capabilities = new DesiredCapabilities();
_capabilities.SetCapability("deviceName", "Nexus One");
_capabilities.SetCapability("newCommandTimeout", "300");
_capabilities.SetCapability(CapabilityType.BrowserName, "Browser");
_capabilities.SetCapability(CapabilityType.Version, "5.0.1");
_capabilities.SetCapability(CapabilityType.Platform, "Android");
//Application path and configurations
_driver = new AndroidDriver(new Uri("http://127.0.0.1:4723/wd/hub"), _capabilities);
_navigation = _driver.Navigate();
_navigation.GoToUrl(@"http://stackoverflow.com");
}
Post a Comment for "How Can I Go To The Given Url In Mobile Chrome Browser Using C# And Appium On Real Device?"