Note that there are some explanatory texts on larger screens.

plurals
  1. POWatiN support for HTML5 tags
    primarykey
    data
    text
    <p>I have the following HTML:</p> <pre><code>&lt;input type="email" id="email"&gt; </code></pre> <p>I want to type text into it from WatiN :</p> <pre><code>var field = Browser.TextField("email"); Assert.IsTrue(field.Exists); </code></pre> <p>But the field can't be found. This is because WatiN doesn't support HTML5 tags yet. I found a <a href="http://sourceforge.net/mailarchive/forum.php?forum_name=watin-users&amp;max_rows=100&amp;style=nested&amp;viewmonth=201204">solution</a> to this by creating an extended TextField-class:</p> <pre><code>[ElementTag("input", InputType = "text", Index = 0)] [ElementTag("input", InputType = "password", Index = 1)] [ElementTag("input", InputType = "textarea", Index = 2)] [ElementTag("input", InputType = "hidden", Index = 3)] [ElementTag("textarea", Index = 4)] [ElementTag("input", InputType = "email", Index = 5)] [ElementTag("input", InputType = "url", Index = 6)] [ElementTag("input", InputType = "number", Index = 7)] [ElementTag("input", InputType = "range", Index = 8)] [ElementTag("input", InputType = "search", Index = 9)] [ElementTag("input", InputType = "color", Index = 10)] public class TextFieldExtended : TextField { public TextFieldExtended(DomContainer domContainer, INativeElement element) : base(domContainer, element) { } public TextFieldExtended(DomContainer domContainer, ElementFinder finder) : base(domContainer, finder) { } public static void Register() { Type typeToRegister = typeof (TextFieldExtended); ElementFactory.RegisterElementType(typeToRegister); } } </code></pre> <p>After registering the type and running the code it still doesn't work. Can anyone see why or does anyone have another workaround for this problem?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload