php - Testing same type of elements with BEHAT -
i want test website. in website maximum 10 profiles when click on search button. each profile have check "location text" & "age value between max.age , min.age values". , xpath these locations & ages same.
i behat.
does have idea how write context file , feature file?
you can try like
/** * click on element xpath parameter * * @when /^i click on element xpath "([^"]*)"$/ */ public function iclickontheelementwithxpath($xpath) { $session = $this->getsession('selenium2'); // mink session $element = $session->getpage()->find('xpath', $xpath); // runs actual query , returns element // errors must not pass silently if (null === $element) throw new invalidargumentexception(sprintf('could not evaluate xpath: "%s"', $xpath)); // ok, let's click on or operation want . $element->click();
}
Comments
Post a Comment