Testing Multiple Languages And the Navigation Menu

Image
estingMenuLanguages

Testing Multiple Languages And the Navigation Menu

In this blog, we will demonstrate automated functional acceptance testing for select languages on a website and the top menu (not all items) using the webship-js tool. For example, we will show testing on the World Health Organization site: https://www.who.int/.

 

The Gherkin scripts for testing Multiple Languages

Feature: Check the language
  As a nonymouse user
  I want to be able to visit the home page
  So that I know that the site is working
  Scenario: Check language
    Given I am on the homepage
     When I select "العربية" from "language-selector"
     Then I should see "حملات منظمة الصحة العالمية"
     When I select "中文" from "language-selector"
     Then I should see "世卫组织宣传活动"
     When I select "Français" from "language-selector"
     Then I should see "Campagnes mondiales de santé publique de l'OMS"
     When I select "Русский" from "language-selector"
     Then I should see "Глобальные кампании ВОЗ по охране здоровья"
     When I select "Español" from "language-selector"
     Then I should see "Campañas para mejorar la salud"
     When I select "English" from "language-selector"
     Then I should see "About us"

 

The Gherkin scripts for testing the Navigation Menu

Feature: Check the top menu
  As a nonymouse user
  I want to be able to visit the home page
  So that I know that the site is working
  
  Scenario: Check Health Topics
    Given I am on the homepage
     When I click "Health Topics"
      And I click "Resources"
     Then I should see "Resources"
     When I click "Health Topics"
      And I click "Fact sheets"
     Then I should see "Fact sheets"
     When I click "Health Topics"
      And I click "Multimedia"
     Then I should see "Multimedia"
     When I click "Health Topics"
      And I click "Podcasts"
     Then I should see "Podcasts"
     When I click "Health Topics"
      And I click "Publications"
     Then I should see "Publications"
      And I should see "Latest publications"
     When I click "Health Topics"
      And I click "Questions and answers"
     Then I should see "Global Report on Health Equity for Persons with Disabilities"
      And I should see "Noncommunicable diseases (NCDs)"
     When I click "Health Topics"
      And I click "Tools and toolkits"
     Then I should see "Tools and toolkits"
      And I should see "Tools and toolkits produced by WHO are listed below."
      
  Scenario: Check Countries
    Given I am on the homepage
     When I click "Countries"
      And I click "WHO in countries"
     Then I should see "Countries"
     When I click "Countries"
      And I click "Data by country"
     Then I should see "World Health Organization"
     When I move backward one page
     When I click "Countries"
      And I click "Country presence"
     Then I should see "WHO’s presence in countries"
     When I click "Countries"
      And I click "Country strengthening"
     Then I should see "Country office strengthening"
      And I should see "for country impact"
     When I click "Countries"
      And I click "Country cooperation strategies"
     Then I should see "Country cooperation strategies"
      And I should see "Working with countries"
      
  Scenario: Check Newsroom
    Given I am on the homepage
     When I click "Newsroom"
      And I click "All news"
     Then I should see "Newsroom"
      And I should see "Latest news from WHO"
      And I should see "Latest press conferences"
     When I click "Newsroom"
      And I click "News releases"
     Then I should see "News"
      And I should see "Browse selected WHO news below."
     When I click "Newsroom"
      And I click "Statements"
     Then I should see "Statements"
      And I should see "Latest"
     When I click "Newsroom"
      And I click "Campaigns"
     Then I should see "WHO global health days"
      And I should see "Mark these days for health in your calendar"

 

Watch the recorded video of the robot while running the automated functional testing feature and display the results in the form of a report 

 

 

Learn more about Step Definitions in Webship-js 

Visit the  documentation site:- https://webship.co/docs