src/Concerns/InteractsWithMouse.php
public function rightClick($selector = null)
    {
        if (is_null($selector)) {
            (new WebDriverActions($this->driver))->contextClick()->perform();
        } else {
            (new WebDriverActions($this->driver))->contextClick(
                $this->resolver->findOrFail($selector)
            )->perform();
        }

        return $this;
    }
public function rightClick($selector = null)
    {
        if (is_null($selector)) {
            (new WebDriverActions($this->driver))->contextClick()->perform();
        } else {
            (new WebDriverActions($this->driver))->contextClick(
                $this->resolver->findOrFail($selector)
            )->perform();
        }

        return $this;
    }
public function rightClick ( $ selector = null ) { if ( is_null ( $ selector ) ) { ( new WebDriverActions ( $ this -> driver ) ) -> contextClick ( ) -> perform ( ) ; } else { ( new WebDriverActions ( $ this -> driver ) ) -> contextClick ( $ this -> resolver -> findOrFail ( $ selector ) ) -> perform ( ) ; } return $ this ; }
Right click the element at the given selector.

@param  string|null  $selector
@return $this
Right click the element at the given selector .