Jan Molak

Essays on Software Development and Delivery

Follow publication

Chrome 91 might break your tests

Jan Molak
5 min readJun 7, 2021

--

The issue

Possible solution #1

Possible solution #2

capabilities: {
'browserName': 'chrome',
'goog:chromeOptions': {
w3c: true,
args: [
'--headless',
]
},
}

Possible solution #3

Possible solution #4

const attribute = await element.getAttribute(name).then(value => {
if (value !== null) {
return value;
}

return browser.executeScript(`
function getAttribute(webElement, attributeName) {
return webElement.getAttribute(attributeName);
}
`, element, name);
})

Possible solution #5

import { Attribute } from '@serenity-js/protractor';Attribute.of(element).called(attributeName)
<input type="checkbox" id="confirm" />
import { actorCalled } from '@serenity-js/core';
import { Ensure, equals } from '@serenity-js/assertions';
import { Target } from '@serenity-js/protractor';
import { by } from 'protractor';
const confirmation = Target.the('confirmation checkbox')
.located(by.id('confirm'));
actorCalled('Alice').attemptsTo(
Ensure.that(
Attribute.of(confirmation).called('checked'),
equals('true')
),
);

Getting started with Serenity/JS

--

--

Jan Molak
Jan Molak

Published in Jan Molak

Essays on Software Development and Delivery

Jan Molak
Jan Molak

Written by Jan Molak

Consulting software engineer and trainer specialising in enhancing team collaboration and optimising software development processes for global organisations.

Responses (1)

Write a response