Created
April 22, 2012 10:07
-
-
Save testingbot/2463226 to your computer and use it in GitHub Desktop.
android c# testingbot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using NUnit.Framework; | |
using System; | |
using Selenium; | |
using System.Web; | |
using System.Text; | |
using System.Net; | |
using OpenQA.Selenium; | |
using OpenQA.Selenium.Remote; | |
namespace Test | |
{ | |
[TestFixture()] | |
public class Test | |
{ | |
private IWebDriver driver; | |
[SetUp] | |
public void Init() | |
{ | |
DesiredCapabilities capabillities = DesiredCapabilities.Android(); | |
capabillities.SetCapability("api_key", "xx"); | |
capabillities.SetCapability("api_secret", "xx"); | |
driver = new RemoteWebDriver( | |
new Uri("http://hub.testingbot.com:4444/wd/hub/"), capabillities); | |
} | |
[Test] | |
public void TestCase() | |
{ | |
driver.Navigate().GoToUrl("http://www.google.com/"); | |
StringAssert.Contains("Google", driver.Title); | |
} | |
[TearDown] | |
public void Cleanup() | |
{ | |
driver.Quit(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment