Retrieve href attribute of hyperlink (#5541)

This commit is contained in:
Cristina Jalba
2020-03-12 14:41:27 +02:00
committed by GitHub
parent c91458df79
commit 22d2a52f68

View File

@@ -29,6 +29,10 @@ export class HyperlinkWidgetPage {
return this.formFields.getFieldText(fieldId, this.fieldLocator);
}
async getFieldHref(fieldId): Promise<string> {
return this.formFields.getWidget(fieldId).element(this.fieldLocator).getAttribute('href');
}
async getFieldLabel(fieldId): Promise<string> {
const label = element.all(by.css(`adf-form-field div[id="field-${fieldId}-container"] label`)).first();
return BrowserActions.getText(label);