Skip to content

Commit

Permalink
added TextBoxWithFocus method to select Harvest dropdowns
Browse files Browse the repository at this point in the history
  • Loading branch information
Shashank Shetty committed Nov 20, 2013
1 parent ba34589 commit e10b353
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/FluentBrowserAutomation/BrowserContext.cs
Expand Up @@ -69,6 +69,7 @@ public interface IBrowserContext
IAmInputThatCanBeChanged Set([NotNull] string labelText);
SpanWrapper SpanWithId([NotNull] string id);
SpanWrapper SpanWithText([NotNull] string spanText);
TextBoxWrapper TextBoxWithFocus();
IEnumerable<SpanWrapper> Spans();
IEnumerable<SpanWrapper> SpansWithClassName([NotNull] string className);
TableWrapper TableWithId([NotNull] string id);
Expand Down Expand Up @@ -479,6 +480,12 @@ public SpanWrapper SpanWithText(string spanText)
return Spans().First(x => x.Text() == spanText);
}

public TextBoxWrapper TextBoxWithFocus()
{
var active = Browser.SwitchTo().ActiveElement();
return new TextBoxWrapper(active, "textbox with focus", this);
}

public IEnumerable<SpanWrapper> Spans()
{
const string howFound = "type 'span'";
Expand Down

0 comments on commit e10b353

Please sign in to comment.