Skip to content

WebDriverSEd Tutorial

Assiance edited this page Mar 20, 2012 · 31 revisions

This is just a very very small taste of WebDriverSed!!!

Creating a FireFox Profile

IWebDriver WebDriver = new FirefoxDriver();

Initializing an Div and Searching By Id within the WebDriver PageSource

DivSe fooDiv = new DivSe(WebDriver, By.Id("anId"));

Initializing an CheckBox and Searching By classname within the fooDiv

CheckBoxSe chkBox = new CheckBoxSe(fooDiv, By.ClassName("name"));

Initializing an Span and Searching By classname and where text contains turtle within the fooDiv (must include WebDriverSed.Extensions namespace)

SpanSe mySpan = new SpanSe(fooDiv, By.ClassName("bar"), i => i.Text.Contains("turtle"));

Returns a list of all the Buttons inside the fooDiv

var myButtons = fooDiv.Buttons;

Returns the first Button inside the fooDiv with an Id of bar

var theButton = fooDiv.Button(i => i.Id == "bar");

Clone this wiki locally