Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

» Selenium IDE Verify different Maps (Hybridview, Mapview etc.)
Fri Nov 25, 2016 9:56 pm by DJ87

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

js substr in IDE

View previous topic View next topic Go down

js substr in IDE

Post by dainova on Tue Sep 11, 2012 1:11 am

Hi, can anybody help how to do right syntax for subscript method inside IDE, no matter what I tried it failes for now:

Code:

| StoreText | //*[@id="M_MainContent_Amount"]  | amt1
| echo    | ${amt1| |                  //** $14.34

Now I need to cut of that dollar sign $ to get  just <14.34>???
| StoreText | javascript{$amt1.substr(1)  | amt1a    //-- ERROR

Thanks all
Dai

dainova
Active particpant
Active particpant

Posts : 19
Join date : 2012-02-23

Back to top Go down

Re: js substr in IDE

Post by sharath on Tue Sep 11, 2012 11:36 am

Hi Dai,

First you have to convert the integer to string value.Then only it is possible to substring.

Hope this helps,
Sharath

sharath
Regular Participant
Regular Participant

Posts : 29
Join date : 2012-08-04

Back to top Go down

Re: js substr in IDE

Post by dainova on Tue Sep 11, 2012 11:19 pm

Tx, I thought taht "$14.34" is the string already, will try.

dainova
Active particpant
Active particpant

Posts : 19
Join date : 2012-02-23

Back to top Go down

Re: js substr in IDE

Post by rosco on Thu Sep 13, 2012 8:14 pm

it seems weird to use storetext with javascript.

rosco
Active particpant
Active particpant

Posts : 20
Join date : 2012-04-05

Back to top Go down

Re: js substr in IDE

Post by rohit13 on Fri Sep 14, 2012 8:31 pm

Code:
store | $14.34 | string
store | 1 | delimiter
store | javascript{storedVars['string'].split('$')[storedVars['delimiter']]} | amt
echo  |  ${amt}


This is solution for your problem

_________________
Radical QA
http://radical-qa.blogspot.in/

rohit13
Master
Master

Posts : 180
Join date : 2012-03-29
Age : 30
Location : INDIA

http://radical-qa.blogspot.in/

Back to top Go down

Re: js substr in IDE

Post by Sponsored content Today at 11:02 am


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