Namespace: untilElementLocatedByTagName

untilElementLocatedByTagName

untilElementLocatedByTagName(driver, tagName, timeopt) → {Object|Error}

untilElementLocatedByTagName

Parameters:
Name Type Attributes Description
driver Object

webdriver object of web browser.

tagName String

tagname of HTML element.

time Number <optional>

time is optional.This parameter represent for how much time user want to wait for "webElement". After time finish it returns error.

Returns:

return a object of "webElement". If we pass time param & it will not get "webElement", it will return error.

Type
Object | Error

Example

Examples usage of untilElementLocatedByTagName by HTML element tagName

 untilElementLocatedByTagName(driver,  'span', time).then((webElement) => {
   // After resolve promise We'll get the "webElement" object for HTML element whose "tagname" we pass.
 }).catch((error) => {
   // handle error
 });