Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/Appium.Net/Appium/AppiumOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ public AppiumOptions() : base()
/// </summary>
public string PlatformVersion { get; set; }

/// <summary>
/// Gets or sets the Browser name of the Appium browser's (e.g. Chrome, Safari and so on) setting.
/// </summary>
public new string BrowserName
{
get { return base.BrowserName; }
set { base.BrowserName = value; }
}

/// <summary>
/// Provides a means to add additional capabilities not yet added as type safe options
/// for the Appium driver.
Expand Down
39 changes: 39 additions & 0 deletions test/integration/Android/Device/BrowserTests.cs
Original file line number Diff line number Diff line change
@@ -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);
}
}
}