WATIN unable to find an input

269 Views Asked by At

I'm new of WatiN, and I have a problem: I'm trying to set the value of a text, but WatiN doesn't find it, with Find.ById, Find.ByName and Find.ByClass; here the html of the object:

<input name="researchBean:jsp_4589_InputDate" 
       class="cal-in calendarInput"
       id="researchBean:jsp_4589_InputDate" 
       type="text" 
       readOnly="readonly" 
       value="01/01/2016">
</input>

I tried with the following lines of code:

txt.TextField(Find.ByClass(p => p.Equals("cal-in calendarInput"))).Value="03/01/2016";
txt.TextField(Find.ById(p => p.Equals("researchBean:jsp_4589_InputDate"))).Value="03/01/2016";
txt.TextField(Find.ByName(p => p.Equals("researchBean:jsp_4589_InputDate"))).Value="03/01/2016";

For all of them the error is the same (a part for Attribute obviously...):

WatiN.Core.Exceptions.ElementNotFoundException: Could not find INPUT (hidden) or INPUT (password) or INPUT (text) or INPUT (textarea) or TEXTAREA element tag matching criteria: Attribute 'className' satisfies predicate at about:blank

I'm using Internet Explorer 11, could it be a matter of configurations?

0

There are 0 best solutions below