WebDriverBy
class WebDriverBy (View source)
The basic 8 mechanisms supported by webdriver to locate a web element.
ie. 'class name', 'css selector', 'id', 'name', 'link text', 'partial link text', 'tag name' and 'xpath'.
Methods
No description
No description
No description
Locates elements whose class name contains the search value; compound class names are not permitted.
Locates elements matching a CSS selector.
Locates elements whose ID attribute matches the search value.
Locates elements whose NAME attribute matches the search value.
Locates anchor elements whose visible text matches the search value.
Locates anchor elements whose visible text partially matches the search value.
Locates elements whose tag name matches the search value.
Locates elements matching an XPath expression.
Details
        
                    protected        
    __construct($mechanism, $value)
        
    
    No description
        
                            string
    getMechanism()
        
    
    No description
        
                            string
    getValue()
        
    
    No description
        
                static            WebDriverBy
    className(string $class_name)
        
    
    Locates elements whose class name contains the search value; compound class names are not permitted.
        
                static            WebDriverBy
    cssSelector(string $css_selector)
        
    
    Locates elements matching a CSS selector.
        
                static            WebDriverBy
    id(string $id)
        
    
    Locates elements whose ID attribute matches the search value.
        
                static            WebDriverBy
    name(string $name)
        
    
    Locates elements whose NAME attribute matches the search value.
        
                static            WebDriverBy
    linkText(string $link_text)
        
    
    Locates anchor elements whose visible text matches the search value.
        
                static            WebDriverBy
    partialLinkText(string $partial_link_text)
        
    
    Locates anchor elements whose visible text partially matches the search value.
        
                static            WebDriverBy
    tagName(string $tag_name)
        
    
    Locates elements whose tag name matches the search value.
        
                static            WebDriverBy
    xpath(string $xpath)
        
    
    Locates elements matching an XPath expression.