Skip to content

Commit

Permalink
Add a step definition when I press value by the attribute name #140
Browse files Browse the repository at this point in the history
  • Loading branch information
TasneemNatshah committed Jul 7, 2024
1 parent 0aee378 commit 260eccc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions examples/test--when--i-press-button.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
<body>
<h1>Press Button</h1>
<div id="result" class="style"></div><br/>
<label for="btn-pressID">Press button</label>
<button id="btn-pressID" class="btn-pressclass" name="btn-pressname" onclick="onClick()">Button</button>
<label for="btn-pressid">Press button</label>
<button id="btn-pressid" class="btn-pressclass" name="btn-pressname" onclick="onClick()">Button</button>

<input type="submit" id="submit-pressID" class="submit-pressclass" name="submit-pressname" value="Submit" onclick="onClick()" />
<input type="submit" id="submit-pressid" class="submit-pressclass" name="submit-pressname" value="Submit" onclick="onClick()" />

</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: An example to press a button

Scenario: Verify clicking a button using its ID attribute.
Given I am on "/test--when--i-press-button.html"
When I press "btn-pressID" by "id" attr
When I press "btn-pressid" by "id" attr
Then I should see "Button Pressed Successfully"

Scenario: Verify that you can click a button using its default name attribute.
Expand Down
4 changes: 2 additions & 2 deletions tests/step-definitions/webship.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ When(/^(I|we)* press "([^"]*)?"$/, function (pronoundCase, element) {

/**
* Presses button with specified element
* Example: When I press "btn-pressID" by attr
* Example: When I press "btn-pressID" by attribute
* Example: When I press "btn-pressid" by attr
* Example: When I press "btn-pressid" by attribute
* Example: And I press "Your full name" by "placeholder" attribute
* Example: And I press "Your full name" by its "placeholder" attribute
* Example: And I press "save-name" by "data-drupal-selector" attr
Expand Down

0 comments on commit 260eccc

Please sign in to comment.