Permalink
Browse files

added TextBoxWithFocus method to select Harvest dropdowns

  • Loading branch information...
1 parent ba34589 commit e10b353a77f7d0e9d9c916e43aa1ec194f3b7f86 @shashankshetty shashankshetty committed Nov 20, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/FluentBrowserAutomation/BrowserContext.cs
@@ -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);
@@ -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'";

0 comments on commit e10b353

Please sign in to comment.