From: Marcelo T. <tam...@gm...> - 2017-03-13 23:38:26
|
After upgrading from 2.13 to 2.25, I am experiencing issues when detecting and populating input field when simulating IE (or Edge). More specifically, it seems like 2.25 is detecting the password input fields as regular Input fields. The issues does not occur when simulating Firefox or Chrome. The underlying HTML code is identical regardless of the browser I am using, so it seems like HTMLUnit is behaving differently with IE for a reason I can't explain. I am accessing the element via HtmlPasswordInput inputPassword = (HtmlPasswordInput) page.getHtmlElementById("Password"); and that is throwing a java.lang.ClassCastException: com.gargoylesoftware.htmlunit.html.HtmlTextInput cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPasswordInput *Here is how the HTML piece looks like when I browser via IE:* <table class="mainLoginTable" id="mainLoginTable" role="presentation"> <tbody> <tr class="signInTextRow"> <td class="loginlabel">Sign In</td> </tr> <tr> <td><LABEL FOR="User">User ID</LABEL></td> <td><INPUT SIZE=20 class="textfield margin-top5" TYPE=text NAME="User" ID="User" VALUE="" ></td> </tr> <tr> <td> <LABEL FOR="Password">Password</LABEL> </td> <td> <INPUT AUTOCOMPLETE="OFF" SIZE=20 maxlength="40" class="textfield margin-top5" TYPE=password NAME="Password" ID="Password" VALUE=""> </td> </tr> <tr> <td class="loginButton" colspan=2> <INPUT class="buttonstylenormal margin-top5" TYPE=submit VALUE="Sign In" onclick="return isFirstClick()"> </td> </tr> </tbody> </table> Is anyone else simulating IE and filling up passwords on forms with 2.25 and experiencing the same issue? Thanks, Marcelo |