You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 7, 2019. It is now read-only.
In one of our projects, we have a scenario that looks like this:
Scenario: Input Invalid Information
Given I go to the "Login" page
When I type "" in the "User Name" field
And I type "1234" in the "Pass Code" field
And I click the "Submit" button
Then the "Username Required Red Error Box" should be displayed
The intent of this scenario is to ensure that an error appears for the User Name field if no value is entered. We recently updated the business logic so that the error will appear on blur events. This scenario works for that situation on OS X, but it fails when run on Windows. It appears that this is because WebDriver doesn't alway focus on an input on Windows if an empty string is sent, so no blur event is triggered as focus shifts in later steps.
The 'When I type "**" in the "**" field' step should always focus on the element, even if no string is typed. This can be done by adding a call to click on the element in the Step Definition:
@When /^I type "([^"]*)" in(?:to)? the "([^"]*)" field$/, (text, fieldName, callback) ->
field = @transform.stringToVariableName(fieldName + 'Field')
@currentPage[field].click()
@currentPage[field].clear()
@currentPage[field].sendKeys(text).then ->
callback()
The text was updated successfully, but these errors were encountered:
In one of our projects, we have a scenario that looks like this:
The intent of this scenario is to ensure that an error appears for the User Name field if no value is entered. We recently updated the business logic so that the error will appear on blur events. This scenario works for that situation on OS X, but it fails when run on Windows. It appears that this is because WebDriver doesn't alway focus on an input on Windows if an empty string is sent, so no blur event is triggered as focus shifts in later steps.
The 'When I type "**" in the "**" field' step should always focus on the element, even if no string is typed. This can be done by adding a call to click on the element in the Step Definition:
The text was updated successfully, but these errors were encountered: