DEV Community

Cover image for Webship-js: When I click "link"
webship.co
webship.co

Posted on

1

Webship-js: When I click "link"

This step definition is used as a command to click a link, to correctly navigate to a specific page that expects to navigate to.

When (I|we)* click "([^"]*)?"

Define the step of clicking the link with the specified id|class|name|title|text.

Example (1) by text:

When I click "Contact Us"
Enter fullscreen mode Exit fullscreen mode

Example (2) by id|class|name:

When we click "contactUs"
Enter fullscreen mode Exit fullscreen mode

Real example testing on the www.un.org/en
site.

Feature: Check header menu
As an anonymous user
I want to be able to visit the home page
Test the header menu so that I know that it is working
 Scenario: Check header menu
   Given I am on the homepage
    When I click "About Us »"
    Then I should see "About Us"
    When I click "Our Work »"
    Then I should see "The United Nations coordinates its work with the funds, programmes, specialized agencies and other organizations of the UN System."
    When I click "Events and News"
    Then I should see "Discover what the United Nations is doing to address the key issues facing the international community."
    When I click "Get Involved"
    Then I should see "Get Involved"
Enter fullscreen mode Exit fullscreen mode

Watch the recorded video of the robot while running the automated functional testing feature

https://www.youtube.com/watch?v=2SGv6DMM3Ag

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay