-1

is there any possibility to loop part of the scenario instead of all steps. Below I have prepared an example, I want to login and click a list of links, but I want to execute the login-part only once. After logging the clicking part should be looped.

Scenario Outline
    Given I am on Homepage
    When I enter Email and Password and press send
    And I am logged in
    *And I click the link <link>
    Examples:
      | link1 |
      | link2 |
      | link3 |
      | link4 |*
Tester
  • 1
  • 1

1 Answers1

0

You should split your scenario in that case. Make the login as a scenario, do not close your driver in between scenarios. Now make the I click the link as a scenario outline in the same feature file.

niharika_neo
  • 8,441
  • 1
  • 19
  • 31