Declarations empower us to confirm the condition of an application and thinks about against the normal. It is utilized in 3 modes, viz. - "affirm", "confirm", and "waitfor". For Example, "check if a thing structure the dropdown is chosen".
The accompanying table records the Selenium declarations that are utilized much of the time, anyway the rundown isn't comprehensive.
Sr.No. | Command/Syntax & Description |
---|---|
1 |
waitForErrorOnNext (message) Waits for error; used with the accessor assertErrorOnNext. |
2 |
verifySelected(selectLocator, optionLocator) Verifies that the selected option of a drop-down satisfies the optionSpecifier. |
3 |
waitForSelected (selectLocator, optionLocator) Waits for getting the option selected; used with the accessor assertSelected. |
4 |
waitForNotSelected (selectLocator, optionLocator) Waits for not getting the option selected; used with accessor the assertSelected. |
5 |
verifyAlert (pattern) Verifies the alert text; used the with accessor storeAlert. |
6 |
waitForAlert (pattern) Waits for the alert; used with the accessor storeAlert. |
7 |
verifyAllButtons (pattern) Verifies the button; used with the accessor storeAllButtons. |
8 |
waitForAllButtons (pattern) Waits for the button to load; used with the accessor storeAllButtons. |
9 |
verifyAllLinks (pattern) Verifies all links; used with the accessor storeAllLinks. |
10 |
waitForAllLinks (pattern) Waits for all links; used with the accessor storeAllLinks. |
11 |
verifyAllWindowIds (pattern) Verifies the window id; used with the accessor storeAllWindowIds. |
12 |
waitForAllWindowIds (pattern ) Waits the window id; used with the accessor storeAllWindowIds. |
13 |
verifyAttribute(attributeLocator, pattern) Verifies an attribute of an element; used with the accessor storeAttribute. |
14 |
waitForAttribute(attributeLocator, pattern) Waits for an attribute of an element; used with accessor storeAttribute. |
15 |
verifyBodyText(pattern) Verifies the body text; used with the accessor storeBodyText. |
16 |
waitForBodyText(pattern) Waits for the body text; used with the accessor storeBodyText. |
17 |
waitForConfirmation(pattern) Waits for confirmation; used with the accessor storeConfirmationPresent. |