casper.then(function() {
console.log("Click Change Password");
casper.click(x('//*[@id="mainMenu"]/div[1]/ul/li[1]/a'));
});
I know it's the correct XPath. I downloaded Chrome's XPath plugin and verified that it is the correct Xpath
My console says
CasperError: Cannot dispatch mousedown event on nonexistent selector: xpath sele ctor: //*[@id="mainMenu"]/div[1]/ul/li[1]/a
C:/CasperJS/modules/casper.js:1355 in mouseEvent
C:/CasperJS/modules/casper.js:462 in click G:/Projects/index.js:137 C:/CasperJS/modules/casper.js:1553 in runStep
C:/CasperJS/modules/casper.js:399 in checkStep
Any help would be greatly appreciated
HTML From First Page
<input alt="Select" class="image selectIcon" name="SUBMIT-chn:$INTERNAL_password.pss" src="docs/pics/select.png" title="Select" type="image" />
HTML From Second Page (i need to enter data into the password field then click the submit button)
<input class="password text " maxlength="250" name="_MYPW" type="password" />
<input class="submit " name="SUBMIT-VERIFY.x" type="submit" value="Verify password" />
HTML From 3rd Page (I need to click the A HREF). [My CasperJS code above was suppose to execute Page 3. but it looks like I never navigated to this page]
<a href="pss.exe?TRANSACTION=CGI_JUMP&SESSDATA=random&SKIN=default&LANG=en-US" >
Change passwords
</a>