Share
Go down
R1986
Posts : 2
Join date : 2013-02-10

gotoIf from parts of storeText possible?

on Sun Mar 17, 2013 1:34 pm
[info] Executing: |clickAndWait | link=Whatever | |
[info] Executing: |storeText | xpath=id('form')/x:table[6]/x:tbody/x:tr[7]/x:td[5] | abc |
[info] Executing: |echo | ${abc} | |
[info] echo: -- XY: 67.13


now i need an gotoIf target that only the numbers check (67.13)
the rest must be ignored. only the numbers.
if is smaller as 67.13 then goto to another line.

can anybody help me?


regards
R1986
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 33
Location : Denver, CO

Re: gotoIf from parts of storeText possible?

on Mon Mar 18, 2013 9:31 pm
In Javascript, use the split() function on the colon and then trim the white space. This will give you that number.

Use the getEval command to execute.
a71688
Regular Participant
Regular Participant
Posts : 27
Join date : 2014-07-23

Re: gotoIf from parts of storeText possible?

on Fri Aug 08, 2014 2:28 pm
An example is given here:


open
http://ibsseo2.${host}.certifikat.dk:8085/testtools/



type
id=useridinput
${cpr3}


clickAndWait
id=submit_view_existing



storeText
id=nemid_number
x


store
${x}
string


storeEval
storedVars['string'].match(/\d+.\d/);
number


open
http://ibsseo2.${host}.certifikat.dk:8085/testtools/



type
id=useridinput
${number}


clickAndWait
id=submit_view_existing

Sponsored content

Re: gotoIf from parts of storeText possible?

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