Note that there are some explanatory texts on larger screens.

plurals
  1. POSelenium script fails to work in Jenkins
    text
    copied!<p>I have a selenium script that works fine locally, as well as when run on the command line of the build machine. But when I run through Jenkins, I am getting different results. (this is a continuation of an <a href="https://stackoverflow.com/questions/10799875/press-enter-key-in-selenium-script/10799927#10799927">earlier post</a> - asking as a new question because I <em>think</em> it's a different issue)</p> <p>My intention is to enter the field data, press Enter, press Tab to leave field/fire the javascript - this will cause a new field (formOrBundleType) to appear.</p> <pre><code> selenium.keyPress("program", "\10"); selenium.type("program", "MIC HOMEOWNERS"); selenium.keyPress("program", "\10"); // slight hack - tabbing out of this field forces the form // to repaint, exposing the formOrBundleType field selenium.keyPressNative(java.awt.event.KeyEvent.VK_TAB + ""); // now grab the exposed field and start the data entry again selenium.keyPress("formOrBundleType", "\10"); selenium.type("formOrBundleType", "HO3 ENHANCED"); </code></pre> <p>In Jenkins, I am getting:</p> <pre><code>[junit] 13:59:48.761 INFO - Command request: type[program, MIC HOMEOWNERS] on session 44eb [junit] 13:59:54.761 INFO - Got result: OK on session 44eb [junit] 13:59:54.776 INFO - Command request: keyPress[program, ] on session 44eb [junit] 14:00:00.776 INFO - Got result: OK on session 44eb12edb47f4a14aa2f3c7733f2ff52 [junit] 14:00:06.776 INFO - Command request: keyDownNative[9, ] on session 44eb [junit] 14:00:06.776 INFO - Creating Robot [junit] 14:00:06.792 INFO - Got result: OK on session 44eb [junit] 14:00:13.105 INFO - Command request: keyPress[formOrBundleType, ] on session 44eb [junit] 14:00:19.105 INFO - Got result: ERROR: Element formOrBundleType not found on session 44eb </code></pre> <p>I've changed all kinds of timing settings, to see if the issue is with the return from the javascript call/painting the form. Has anyone else run into this?</p>
 

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