Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import { expect } from 'chai';
describe('Bad test when awaiting google Suite', () => {
beforeEach(async () => {
await browser.url('https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=bit-bundler');
});
describe('Getting all results container', () => {
var resultWithId, resultText;
beforeEach(async () => {
resultWithId = browser
.waitForExist('[data-hveid="41"]')
.element('[data-hveid="41"]');
// Awaiting here breaks getText
await resultWithId;
resultText = await resultWithId.getText('.r');
});
it('then the text is all good', () => {
expect(resultText).to.equal('bit-bundler-browserpack - npm');
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.