Some commands in Selenium IDE (Part 2)

Tram Ho

1. Check the fields UI

1.1 Check title

Method 1 :

Command: assert / verify title

Target: title according to the spec

Method 2 :

  • Call variable x to be the title of the page:

    Command: store title

    Value: x

  • Check that the title is retrieved by the variable x with the correct k

    Command: verify

    Target: x

    Value: title according to the spec

Example : Check the title of the HTML page in the website https://www.w3schools.com/

Step 1: Open the website https://www.w3schools.com/

Step 2: Click the “Lerarn HTML” link

Step 3: Check the title of the page

Method 1 : Use ” verify title

Method 2 : Use variables to call to the title

1.2 Check the label of the element

Method 1 :

Command: assert / verify text

Target: position of element

Value: label according to the spec

For example : Check the school’s label

Method 2:

  • Call variable x as the label of the element

    Command: store text

    Target: position of element

    Value: x

  • Checks the value of the variable x correctly with the desired label

    Command: Verify

    Target: x

    Value: Label / Text desired

For example :

1.3 Check the status of the school

a. The field is editable

Command: assert / verify editable

Target: the location of the school

For example : Check that the textbox search is editable

Run the IDE

b) The school cannot be edited

Command: assert / verify not editable

Target: the location of the school

For example, checking the ” Employee code ” field is not editable

Running IDE: Precondition: ABC staff has logged into the system.

1.4 Check the school’s placeholder

  • Set the variable x to be the value of the placeholder attribute

    Command: store attribute

    Target: value of element + @placeholder

    Value: x

  • Check the value of the variable x

    Command: verify

    Target: x

    Value: Placeholder of the field according to the spec

For example : Check the placeholder of a textbox search Run the IDE:

1.5 Check the value of the field

Method 1 :

Command: assert / verify value

Target: Location of element

Value: the value of the element

Method 2:

  • Call variable x as the value of the field

    Command: store value

    Target: The position of the element

    Value: x

  • Check the value of variable x with the desired value

    Command: verify

    Target: x

    Value: value in space

    References

    https://ui.vision/rpa/docs/selenium-ide

Share the news now

Source : Viblo