diff --git a/src/Appium.Net/Appium/AppiumOptions.cs b/src/Appium.Net/Appium/AppiumOptions.cs index bc9def95b..240f28f6f 100644 --- a/src/Appium.Net/Appium/AppiumOptions.cs +++ b/src/Appium.Net/Appium/AppiumOptions.cs @@ -51,6 +51,15 @@ public AppiumOptions() : base() /// public string PlatformVersion { get; set; } + /// + /// Gets or sets the Browser name of the Appium browser's (e.g. Chrome, Safari and so on) setting. + /// + public new string BrowserName + { + get { return base.BrowserName; } + set { base.BrowserName = value; } + } + /// /// Provides a means to add additional capabilities not yet added as type safe options /// for the Appium driver. diff --git a/test/integration/Android/Device/BrowserTests.cs b/test/integration/Android/Device/BrowserTests.cs new file mode 100644 index 000000000..f421762c5 --- /dev/null +++ b/test/integration/Android/Device/BrowserTests.cs @@ -0,0 +1,39 @@ +using Appium.Net.Integration.Tests.helpers; +using NUnit.Framework; +using OpenQA.Selenium.Appium; +using OpenQA.Selenium.Appium.Android; +using System; + +namespace Appium.Net.Integration.Tests.Android.Device.App +{ + internal class BrowserTests + { + private AppiumDriver _driver; + private AppiumOptions _androidOptions; + + [OneTimeSetUp] + public void SetUp() + { + _androidOptions = new AppiumOptions(); + _androidOptions.BrowserName = "Chrome"; + + _driver = new AndroidDriver( + Env.ServerIsLocal() ? AppiumServers.LocalServiceUri : AppiumServers.RemoteServerUri, + _androidOptions); + _driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10); + } + + [OneTimeTearDown] + public void TearDown() + { + _driver.Dispose(); + } + + [Test] + public void Browser() + { + _driver.Navigate().GoToUrl("https://github.com/appium"); + Assert.IsNotEmpty(_driver.PageSource); + } + } +} \ No newline at end of file