Javascript actions
open | / |  |
answerOnNextPrompt | pyselenese-test-answeronnextprompt |  |
runScript | e = document.createElement("div"); e.setAttribute("id", "pyselenese-test-runscript"); document.getElementsByTagName("body")[0].appendChild(e); |  | Run some Javascript in the AUT window to create a test div
assertXpathCount | //body/div[@id='pyselenese-test-runscript'] | 1 | Check that runScript created the test div
runScript | e = document.createElement("div"); e.setAttribute("id", window.prompt()); document.getElementsByTagName("body")[0].appendChild(e); |  | Capture an answerOnNextPrompt
assertXpathCount | //body/div[@id='pyselenese-test-answeronnextprompt'] | 1 | Check that answerOnNextPrompt named the test div
addScript | selenium.doOpen('/login'); | pyselenese-js-1 | Using addScript to call the selenium JS object methods directly
waitForPageToLoad |  |  |
assertTextPresent | Password |  | addScript ought to have forwarded us to the /login page