Issues after upgrade from 2.13 to 2.25 (Internet explorer)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Issues after upgrade from 2.13 to 2.25 (Internet explorer)

Marcelo Tamassia
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

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Issues after upgrade from 2.13 to 2.25 (Internet explorer)

asashour
Hi Marcelo,

Thanks for reporting, it is fixed in SVN.

This is due to incorrect handling of upper case attributes with IE. If the TYPE attribute is 'type', then HtmlUnit works correctly, but not if it is upper case.

Yours,
Ahmed



From: Marcelo Tamassia <[hidden email]>
To: [hidden email]
Sent: Tuesday, March 14, 2017 12:37 AM
Subject: [Htmlunit-user] Issues after upgrade from 2.13 to 2.25 (Internet explorer)

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

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Issues after upgrade from 2.13 to 2.25 (Internet explorer)

Marcelo Tamassia
In reply to this post by Marcelo Tamassia
Ahmed, thank you very much for the prompt reply and fix.

 It looks like the latest passing build on Team City is from March 1st so I will be checking it periodically to obtain a snapshot that includes the fix.


On Tue, Mar 14, 2017 at 3:20 AM, <[hidden email]> wrote:
Date: Tue, 14 Mar 2017 07:17:44 +0000 (UTC)
From: Ahmed Ashour <[hidden email]>
Subject: Re: [Htmlunit-user] Issues after upgrade from 2.13 to 2.25
        (Internet       explorer)
To: "[hidden email]"
        <[hidden email]>
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="utf-8"

Hi Marcelo,
Thanks for reporting, it is fixed in SVN.
This is due to incorrect handling of upper case attributes with IE.?If the TYPE attribute is 'type', then HtmlUnit works correctly, but not if it is upper case.
Yours,Ahmed

      From: Marcelo Tamassia <[hidden email]>
 To: [hidden email]
 Sent: Tuesday, March 14, 2017 12:37 AM
 Subject: [Htmlunit-user] Issues after upgrade from 2.13 to 2.25 (Internet explorer)

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
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

------------------------------

_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Issues after upgrade from 2.13 to 2.25 (Internet explorer)

asashour
Hi Marcelo,

A build was made successful (by skipping tests, since we have another issue at the moment).

Hope you find it useful,
Ahmed


From: Marcelo Tamassia <[hidden email]>
To: [hidden email]
Sent: Tuesday, March 14, 2017 4:46 PM
Subject: Re: [Htmlunit-user] Issues after upgrade from 2.13 to 2.25 (Internet explorer)

Ahmed, thank you very much for the prompt reply and fix.

 It looks like the latest passing build on Team City is from March 1st so I will be checking it periodically to obtain a snapshot that includes the fix.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
Loading...