selenium ide - While recording the script, scripts records the command like "click id=ui-id-25" -
i recording site of online ticket booking , while recording script, scripts records command "click id=ui-id-25". once finish recording script , click on play run current test case. error message 'element id=ui-id-25 not found'.
so please let me know what's meaning of command 'click id=ui-id-25' , why recorded, though while running script error message.
the meaning of command
the command click id=someid
tells selenium simulate click on element on page has id = "someid"
. if there no element id
on page @ time of execution of command; have error telling element ... not found !
.
why it's recorded
selenium ide records actions in page. clicking element of page action it's recorded.
why error
this because selenium ide doesn't record "waiting time". if, while recording, action 1
, wait element shown (even 0.5 second) , click on element. selenium, 2 actions :
- doing
action 1
- clicking element
and when running test case, try click element directly after doing action 1
without waiting. in case, doesn't find element , gives error !
okey, solution ?
one simple solution add command waitforelementpresent
wait element present on page before clicking it. can while recording test case right click on element , selecting command before clicking on it. or can add test case when seeing error. add before click
command causing error , give same argument click
( ie. id = ui-id-25
in case)
hope answers questions
Comments
Post a Comment