Permalink
Browse files

added a text property to INavigationControl

  • Loading branch information...
1 parent 8f16910 commit 405c1bcf346c54bb7bb607c3b014881b43997a23 @shashankshetty shashankshetty committed May 10, 2013
@@ -22,6 +22,16 @@ public string Id
return Element.GetAttribute("id");
}
}
+
+ public string Name
+ {
+ get
+ {
+ this.Exists().ShouldBeTrue();
+ return Element.GetAttribute("name");
+ }
+ }
+
public string HowFound { get; private set; }
}
}
@@ -1,3 +1,4 @@
+using FluentBrowserAutomation.Accessors;
using OpenQA.Selenium;
namespace FluentBrowserAutomation.Controls
@@ -8,5 +9,10 @@ public ButtonWrapper(IWebElement button, string howFound, IBrowserContext browse
: base(button, howFound, browser)
{
}
+
+ public string Text
+ {
+ get { return new ReadOnlyText("value of " + HowFound, Element.GetAttribute("value")); }
+ }
}
}
@@ -1,6 +1,9 @@
+using FluentBrowserAutomation.Accessors;
+
namespace FluentBrowserAutomation.Controls
{
public interface INavigationControl : ICanBeClicked, IAmVisualElement, ICouldBeDisabled
{
+ string Text { get; }
}
}
@@ -1,3 +1,4 @@
+using FluentBrowserAutomation.Accessors;
using OpenQA.Selenium;
namespace FluentBrowserAutomation.Controls
@@ -8,5 +9,10 @@ public ImageWrapper(IWebElement webElement, string howFound, IBrowserContext bro
: base(webElement, howFound, browser)
{
}
+
+ public string Text
+ {
+ get { return new ReadOnlyText("alt of " + HowFound, Element.GetAttribute("alt")); }
+ }
}
}
@@ -1,3 +1,4 @@
+using FluentBrowserAutomation.Accessors;
using OpenQA.Selenium;
namespace FluentBrowserAutomation.Controls
@@ -8,5 +9,10 @@ public LinkWrapper(IWebElement link, string howFound, IBrowserContext browserCon
: base(link, howFound, browserContext)
{
}
+
+ public string Text
+ {
+ get { return new ReadOnlyText("text of " + HowFound, Element.GetAttribute("text")); }
+ }
}
}
@@ -18,6 +18,7 @@ public interface IHaveBasicInfo
IWebElement Element { get; }
string HowFound { get; }
string Id { get; }
+ string Name { get; }
}
public static class IBasicInfoExtensions

0 comments on commit 405c1bc

Please sign in to comment.