My current setup involves Cucumber 1.2.1 with Watir-webdriver 0.6.1 for webpage testing.
While the tests run smoothly on my local machine, I encounter a timeout issue on a CI machine (Jenkins) when trying to fill out a javascript form. Despite having email and password text fields, Cucumber struggles to populate them. In some instances, only the email field gets filled after a two-minute delay...
The javascript form opens as expected. Here's the link that triggers its launch:
`<a id="user_popup" class="textuser_popup" url="/en/bla/" href="javascript:void(0);" trackclick="click/unlogged/test/test/login" rel="nofollow" gaclick="/en/bla/homepage/click:header-section>login">Sign in</a>`
Once the form loads, the code for the email and password fields looks like this:
<ul class="signin">
<li class="reg_form">
<label class="reg_form_label">Your email</label>
<input id="yourEmail" class="l_email" type="text" value="" name="email">
</li>
<li class="password_area">
<label class="reg_form_label">Your password</label>
<input id="yourPassword" class="l_password" type="password" name="password">
</li>
</ul>
Even utilizing PageObject and accessing the elements directly in the step has not proven effective. This is how I attempt to fill out the fields:
@browser.text_field(:id, "yourEmail").set("<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="adc8c0ccc4c1edc9c2c0ccc4c383cec2c0">[email protected]</a>")
@browser.text_field(:id, "yourPassword").set("thePass")
Ultimately, the encountered error reads:
execution expired (Timeout::Error)
/usr/lib/ruby/1.8/timeout.rb:64:in `rbuf_fill'
/usr/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill'
/usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
/usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'
/usr/lib/ruby/1.8/net/http.rb:2028:in `read_status_line'
/usr/lib/ruby/1.8/net/http.rb:2017:in `read_new'
/usr/lib/ruby/1.8/net/http.rb:1051:in `request'
/usr/lib/ruby/1.8/net/http.rb:1037:in `request'
/usr/lib/ruby/1.8/net/http.rb:543:in `start'
/usr/lib/ruby/1.8/net/http.rb:1035:in `request'
Everything works fine when running the test locally. However, the failure occurs during remote execution. The remote browser (typically in headless mode, but I've initiated an X11 session for monitoring) is Firefox ESR 10.0.8, and the OS is CentOS.
If you have any insights or suggestions on what might be happening, please feel free to share. Additional information can be provided upon request.
Any guidance or recommendations are greatly appreciated :)