Namespace: findElementsByClass

findElementsByClass

findElementsByClass(driver, className) → {Array.<Object>}

findElementsByClass

Parameters:
Name Type Description
driver Object

webdriver object of web browser.

className String

class attribute value of HTML element.

Returns:

return a object of "webElement".

Type
Array.<Object>

Example

Examples usage of findElementsByClass by HTML class

 findElementsByClass(driver, 'testClass' ).then((webElement) => {
   //After resolve promise We'll get the Array of "webElement" object for HTML element whose "class" is similar.
   // Here 'testClass' is class attribute value of HTML element.
 }).catch((error) => {
   //handle error
 });