diff --git a/test/lib/webdriver/webdriver.class.php b/test/lib/webdriver/webdriver.class.php index 59a85494c4..6e5bb3bf97 100644 --- a/test/lib/webdriver/webdriver.class.php +++ b/test/lib/webdriver/webdriver.class.php @@ -999,8 +999,14 @@ class dom if($xpath != 'form') { - $this->driver->findElement(WebDriverBy::xpath("//a[@title='$value']"))->click(); - $this->driver->findElement(WebDriverBy::xpath("//*[@id='pick-pop-$pickerID']//span[@class='is-match-keys']"))->click(); + try + { + $this->driver->findElement(WebDriverBy::xpath("//a[@title='$value']"))->click(); + } + catch(Exception $xpathException) + { + $this->driver->findElement(WebDriverBy::xpath("//*[@id='pick-pop-$pickerID']//span[@class='is-match-keys']"))->click(); + } } else {