Reputation: 7012
I want to create a generic function that notifies on errors
I can't seem to find a way to get the css selector from an ElementFinder member
Here's my function:
static waitForElementToExist(elementFinder: ElementFinder): SeleniumPromise<any> {
return browser.wait(until.presenceOf(elementFinder),
jasmine.DEFAULT_TIMEOUT_INTERVAL,
MyErrors.elementNotFound(<get element selector string>));
};
so I can return a meaningful error like:
could not found the element '.class-selector'
can anyone point me to the right direction please? :-)
Upvotes: 3
Views: 594