How to select proper Action for web target in Selenium IDE

流过昼夜 提交于 2019-12-06 08:19:20

I use webdriver but I am familiar with IDE and so far I know it depends on your application how you want to handle the tests. If your application uses ajax calls you might need to use some frequent waitForElementPresent or waitForSearch etc.. and Assertions also depend on the needs of your tests.

Now, the question is how do you know which extra step do you need to insert? Ans. is you will know the necessity. Such as, if your test step depends on a previous ajax call to finish then you know there is a wait necessary and you know what to do. Not to mention, you can always insert extra steps and I am sure you already know that. And, there is no standard for using those. You adjust your tests depending on your necessity

you need to go through introduction to selenium ide or just think straight this way that if any action needs loading of page, you simple need to wait for element present and the perform click

click|target|
waitForElementPresent|target|


or if you need to store any value you can use

storeEval|target|value

also the variable name in the selenium ide is named followed by $variableName
enter can be performed as ${KEY_ENTER}

to verify any value we can use AssertValue or VerifyValue
the difference between assert and verify is that assert stops the execution of test case if the     value is false whereas verify gives error and execute next statement.

these are few points to be noted in selenium ide.

hope this answer would help you!

You may want to try Implicit Wait addon for Selenium IDE. It will automatically call WaitForElementPresent before executing actions on that element (like clicks). This may save you some time.

Here is the link of Selenium API, all actions can be found here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!