Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Please help.. cant figure out variable!

View previous topic View next topic Go down

Please help.. cant figure out variable!

Post by eyekyu on 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!


eyekyu

Posts : 3
Join date : 2011-07-05

Back to top Go down

Re: Please help.. cant figure out variable!

Post by Arthur on Tue Jul 05, 2011 2:06 pm

Hi,

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']")
then you can use to click the same.
Code:
sel.click("//*[contains(@id,'link')]")
If fail to do with this then give example of code where you want to click.

Thanks

Arthur
Active particpant
Active particpant

Posts : 23
Join date : 2011-05-23
Location : Pune

Back to top Go down

Re: Please help.. cant figure out variable!

Post by eyekyu on 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

Back to top Go down

Re: Please help.. cant figure out variable!

Post by eyekyu on 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>


eyekyu

Posts : 3
Join date : 2011-07-05

Back to top Go down

Re: Please help.. cant figure out variable!

Post by Sponsored content Today at 5:08 pm


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum