Understanding the Selenese command in Selenium IDE? – User friendly Tech help
What is selenese command?
n
Learn to ask Questions |
n
n
nSelenese is set of commands used by selenium to automate the web application testing. These commands are divided into 3 parts which is interpreted by selenium core (engine of selenium) to perform action on application under test. Particularly these commands guides Selenium what action to do. We can say that these combination of these commands creates our test script.
n
n3A’s
nSelenese is a combination of as 3A’s :-
n
nAction – Accessor – Assertion
n
nExample:-
n
Editor view of IDE, with Command highlighted |
n
Selenese command comparison in IDE and WebDriver |
n
Meaning:-
n
Action: –
nCommands used to change the state of the AUT(Application under Test), like click on some link, type a value in edit box, select some options on the page, select a value from drop down etc.
nWhen action is performed on AUT the test will fail if the action is not achieved.
n
nEg:- Click,close ,doubleclick
n
nAccessor:-
nThis command check the state of the application and save the application state in some variable. It can be used for automatic generation of assertions.
n
nEg:- storeTitle,storeElementPresent
n
nAssertions:-
nAre very similar to checkpoint in UFT/QTP. Assertion verifies the state of the application matches it with the expected state and generates the True/False result.
n
nEg :- verifyText, assertText
n
nDifference between assert and Verify?
n
nAssert :- Incase we are using this command, test stops if it fails.
n
nVerify :- will check the expected and actual values , and report the results but test will continue running.
n
nThus we can use a “assert” command to check that application is on the correct page and then we can use “verify” command to test the individual objects of page.
n
nHow to find command in IDE ?
nIn Editor of IDE -> Right click on any row ->Insert new command
n
n
Insert new command in IDE |
n
Under command section type the initials for the command to be searched ,IDE will show commands help.
n
n
Search for command |
n
nFor complete command reference
n
Working with Selenium WebDriver?