[FTR] Add getAttribute helpers to TestSubjects (#14340)

This commit is contained in:
Tim Sullivan 2017-10-06 09:28:46 -07:00 committed by GitHub
parent 8cde5ef98e
commit 57c25307b5

View file

@ -62,6 +62,19 @@ export function TestSubjectsProvider({ getService }) {
});
}
async getAttributeAll(selector, attribute) {
return await this._mapAll(selector, async (element) => {
return await element.getAttribute(attribute);
});
}
async getAttribute(selector, attribute) {
return await retry.try(async () => {
const element = await this.find(selector);
return await element.getAttribute(attribute);
});
}
async setValue(selector, text) {
return await retry.try(async () => {
const element = await this.find(selector);