- eyekyu
- Posts : 3
Join date : 2011-07-05
Please help.. cant figure out variable!
Tue Jul 05, 2011 4:37 am
Love Selenium IDE.... theres just one thing i cant figure out.... ive been using it to Find and click a reference on a page... it is a clickable button with text that reads "Pay $12,098 to Fix it quick!" im using the "Clickandwait" command....
My line in selenium looks like //input[@value='Pay $12,098 to Fix it quick!']
the problem is... the number is different every time... sometimes it might just be $6,849 or it could be up to $184,212
so what I need is a way for selenium to always click that button.. no matter what the money value is.... can someone please help me!
My line in selenium looks like //input[@value='Pay $12,098 to Fix it quick!']
the problem is... the number is different every time... sometimes it might just be $6,849 or it could be up to $184,212
so what I need is a way for selenium to always click that button.. no matter what the money value is.... can someone please help me!
- ArthurActive particpant
- Posts : 23
Join date : 2011-05-23
Location : Pune
Re: Please help.. cant figure out variable!
Tue Jul 05, 2011 2:06 pm
Hi,
You can use
globs, exact and regular expressions when the data is dynamic.
If this doesn't work use
if fire bugs xpath to link is following
Thanks
You can use
globs, exact and regular expressions when the data is dynamic.
- Code:
glob: Pay $* to Fix it quick!
If this doesn't work use
if fire bugs xpath to link is following
- Code:
sel.click("//*[@id='link-icon-unknown-vir_full']")
- Code:
sel.click("//*[contains(@id,'link')]")
Thanks
- eyekyu
- Posts : 3
Join date : 2011-07-05
Re: Please help.. cant figure out variable!
Tue Jul 05, 2011 9:31 pm
great.. thanx for the help.. but where do i actually put that code that you gave me...? i have no idea how to incorporate it.
- eyekyu
- Posts : 3
Join date : 2011-07-05
Re: Please help.. cant figure out variable!
Wed Jul 06, 2011 4:16 am
heres a piece of the code
- Code:
<form action="/isolation" method="post">
<input type="hidden" name="cmd" value="bribeout">
<h1>Bribe Out</h1>
<p align="center"><input type="submit" class="button" value="Pay $9,900 to Fix it Quick!"></p>
</form>
Permissions in this forum:
You cannot reply to topics in this forum