Testing Website Search Using Webship-js Tool

webshipcowebshipco
2 min read

In this blog, we will demonstrate automated functional acceptance testing for search functionality on the homepage and the search page. We will use the United Nations site: https://www.un.org/en as an example.

Watch the recorded video of the robot while running the automated functional testing feature
https://www.youtube.com/watch?v=kWfzUuL_r8k

We will use some step definitions to create the scenario required for testing website search, such as

For input text

When I fill in "field" with "value" by its "placeholder" attribute

This step definition involves entering a specific value into a designated field on the tested website, identified by its attribute.

This field can be specified by id | class | name | placeholder for the field. It is possible to add or not add a sign “.” for class, and "#" for id.

You can see more step definitions: https://webship.co/docs

For press button

When I press "button" by attribute

This step definition is used as a command to press a button, ensuring the correct execution of the expected action.

Define the step for pressing the button with the specified ID, class, name, title, or value.

You can see more step definitions: https://webship.co/docs

To see the result

Then I should see "text in the page"

This step definition is used to be sure that the text specified exists on the current page

You can see more step definitions: https://webship.co/docs

For click line

When I click "link" by attribute

This step definition is used as a command to click a link, ensuring correct navigation to the expected page.

Define the step for clicking the link by its id|class|name|title or any attribute.

You can see more step definitions: https://webship.co/docs

See all the blog : https://webship.co/blog/testing-website-search-using-webship-js-tool

Watch the recorded video of the robot while running the automated functional testing feature
https://www.youtube.com/watch?v=kWfzUuL_r8k

1
Subscribe to my newsletter

Read articles from webshipco directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

webshipco
webshipco

Love to help in speeding up the work of having Automated Functional Acceptance Testing for products to ship websites in a swift way.