*[misc] Fix bug that picker doesn't work.

This commit is contained in:
luxuyang
2024-08-26 08:48:41 +08:00
committed by 李阳
parent ef762ab5ed
commit bf5a59e554
+8 -2
View File
@@ -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
{