Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

how to record a test case in javascript

View previous topic View next topic Go down

how to record a test case in javascript

Post by feuser on Fri Oct 12, 2012 12:21 am

Hi,
Is it possible to do this with Selenium IDE? If yes any guidance would be greatly appreciated.

feuser

Posts : 1
Join date : 2012-10-12

Back to top Go down

Re: how to record a test case in javascript

Post by rosco on Mon Oct 15, 2012 6:59 pm

Hello,
What do you want to do ???
With selenium ide you can record the test case (by defaut GUI is set in recorder option at open). What do you want to do with javascript ?

rosco
Active particpant
Active particpant

Posts : 20
Join date : 2012-04-05

Back to top Go down

Re: how to record a test case in javascript

Post by a71688 on Fri Oct 30, 2015 5:26 pm

Example dates where i check that todays date is being displayed. Scripts loops and stop when found


    open
    ${testTools}
   


    type
    id=useridinput
    ${cprNumber}


    clickAndWait
    id=submit_view_existing
   


    label
    LOOP PIN CODES
   


    storeTextPresent
    javascript{var currentDate = new Date(); var month = currentDate.getMonth() + 1; if (month < 10) { month = "0" + month }; var day = currentDate.getDate(); if (day < 10) { day = "0" + day }; var year = currentDate.getFullYear(); curentDate=(year + "-" +month + "-" + day);}
    date


    gotoIf
    ${date}==true
    END LOOP PIN CODES


    pause
    2000
   


    refresh
   
   


    waitForPageToLoad
    60000
   


    gotoIf
    ${date}==false
    LOOP PIN CODES


    label
    END LOOP PIN CODES
   


    open
    ${testTools}
   


    type
    id=useridinput
    ${cprNumber}


    clickAndWait
    id=submit_view_existing
   


    label
    LOOP Pincode serial
   


    storeTextPresent
    ACTIVE
    isActive


    gotoIf
    ${isActive}==true
    END LOOP Pincode serial


    pause
    10000
   


    refresh
   
   


    waitForPageToLoad
    60000
   


    gotoIf
    ${isActive}==false
    LOOP Pincode serial


    label
    END LOOP Pincode serial
   


    waitForText
    id=cardstatus0
    PENDING


    waitForText
    //table[@id='pincodes_details']/tbody/tr[2]/td[2]
    ACTIVE


    selectWindow
    null
   


    storeText
    css=#cardserial0 > a
    Cardserial


    storeText
    id=nemid_number
    userid


    storeEval
    storedVars['userid'].match(/\d+.\d/)
    userid


    storeText
    id=pin_data_active
    pin


    storeEval
    'CPR:' + storedVars.cprNumber +' / NemID:'+ storedVars.userid
    reportDataFromUa2a

a71688
Regular Participant
Regular Participant

Posts : 27
Join date : 2014-07-23

Back to top Go down

Re: how to record a test case in javascript

Post by Sponsored content


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