September 2018
Intermediate to advanced
764 pages
20h 6m
English
The last step is to do the following:
Then the "#register-button" element should have a "disabled" attribute
As before, we need to find the element, but this time read its disabled attribute and assert that it is set to "true".
In spec/cucumber/steps/assertions/index.js, add the following:
import assert from 'assert';import { Given, When, Then } from 'cucumber';import { By } from 'selenium-webdriver';When(/^the (?:"|')([\.#\w-]+)(?:"|') element should have a (?:"|')([\w_-]+)(?:"|') attribute$/, async function (selector, attributeName) { const element = await this.driver.findElement(By.css(selector)); const attributeValue = await ...Read now
Unlock full access