public function clickListElement(string $name, ?string $contentType = null): void
    {
        $pagination = ElementFactory::createElement($this->context, Pagination::ELEMENT_NAME);
        $elementPositionInTable = $this->getElementPositionInTable($name, $contentType);
        $isElementInTable = (bool) $elementPositionInTable;

        while (!$isElementInTable && $pagination->isNextButtonActive()) {
            $pagination->clickNextButton();
            $elementPositionInTable = $this->getElementPositionInTable($name, $contentType);
            $isElementInTable = (bool) $elementPositionInTable;
        }

        Assert::assertTrue($isElementInTable, sprintf('There\'s no subitem %s on Sub-item list', $name));

        $this->context->findElement(sprintf($this->fields['nthListElement'], $elementPositionInTable))->click();
    }
public function clickListElement(string $name, ?string $contentType = null): void
    {
        $pagination = ElementFactory::createElement($this->context, Pagination::ELEMENT_NAME);
        $elementPositionInTable = $this->getElementPositionInTable($name, $contentType);
        $isElementInTable = (bool) $elementPositionInTable;

        while (!$isElementInTable && $pagination->isNextButtonActive()) {
            $pagination->clickNextButton();
            $elementPositionInTable = $this->getElementPositionInTable($name, $contentType);
            $isElementInTable = (bool) $elementPositionInTable;
        }

        Assert::assertTrue($isElementInTable, sprintf('There\'s no subitem %s on Sub-item list', $name));

        $this->context->findElement(sprintf($this->fields['nthListElement'], $elementPositionInTable))->click();
    }
public function clickListElement ( string $ name , ? string $ contentType = null ) : void { $ pagination = ElementFactory :: createElement ( $ this -> context , Pagination :: ELEMENT_NAME ) ; $ elementPositionInTable = $ this -> getElementPositionInTable ( $ name , $ contentType ) ; $ isElementInTable = ( bool ) $ elementPositionInTable ; while ( ! $ isElementInTable && $ pagination -> isNextButtonActive ( ) ) { $ pagination -> clickNextButton ( ) ; $ elementPositionInTable = $ this -> getElementPositionInTable ( $ name , $ contentType ) ; $ isElementInTable = ( bool ) $ elementPositionInTable ; } Assert :: assertTrue ( $ isElementInTable , sprintf ( 'There\'s no subitem %s on Sub-item list' , $ name ) ) ; $ this -> context -> findElement ( sprintf ( $ this -> fields [ 'nthListElement' ] , $ elementPositionInTable ) ) -> click ( ) ; }
Click link element for sub-item with given name.

@param string $name
Click link element for sub - item with given name .