1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-29 21:24:44 +03:00

Try getting element directly in waitForElement

This can avoid 3 round trips to Selenium server in most situations, so
it can help performance.

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař
2017-09-07 08:35:06 +02:00
parent eae223215a
commit c674ab8791

View File

@@ -390,6 +390,13 @@ abstract class PMA_SeleniumBase extends PHPUnit_Extensions_Selenium2TestCase
*/
public function waitForElement($func, $arg)
{
try {
return call_user_func_array(
array($this, $func), array($arg)
);
} catch(Exception $e) {
// Element not present, fall back to waiting
}
$this->timeouts()->implicitWait(10000);
$element = call_user_func_array(
array($this, $func), array($arg)