For button click on your page example this is correct way to click it:
find(:xpath, “//*[@id=“sImage1”]”).click
2012/11/9 john smith [email protected]
For button click on your page example this is correct way to click it:
find(:xpath, “//*[@id=“sImage1”]”).click
2012/11/9 john smith [email protected]
ive been trying to look up xpath and css selectors. i have my program
fill out the email and all i need to figure out now is to press the send
button. but its not like the other buttons i have used.
that is the code from the pages source file. this is the send button i |
GOT IT!!!
find(:xpath, “//[@class=‘CLiKStdleft’]").click
find(:xpath, "//[@src=’/01/images/pg3_but2_new.gif’]”).click
theres the missing code! feels good now that it works though. thank you
for all your help!
find(:xpath, “//*[@class=‘CLiKStdleft’]”).click
It could be written with CSS selectors:
find(:css, “.CLiKStdleft”).click
or shorter (since CSS is default selector in Capybara):
find(“CLiKStdleft”).click
“Иван Бишевац” [email protected] wrote in post #1083769:
For button click on your page example this is correct way to click it:
find(:xpath, “//*[@id=“sImage1”]”).click2012/11/9 john smith [email protected]
“id=sImage1” is the button to log into the webpage. i have already
gotten past that to the email page, it fills out all the fields and all
i need to do is click the send button on the email page. but when i look
at it with firebug its completely different than the log on button. i
put the code in my previous response for the new button.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs