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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -