Ilya Khaustov
Ilya Khaustov

Reputation: 328

Selenium+PHPUnit: Set maximum waiting time in waitForElementPresent

I use Selenium and PHPUnit. In my testcases, I use

PHPUnit_Extensions_SeleniumTestCase::waitForElementPresent($xpath);

to wait for some time until element specified by $xpath becomes present. Is there any way to change the maximum time of waiting?

Upvotes: 1

Views: 2366

Answers (1)

Abhishek_Mishra
Abhishek_Mishra

Reputation: 4621

waitForElementPresent() takes two arguments. The first one is the locator and the other is Timeout in miliseconds.

Example :

waitForElementPresent("Your xpath","80000"). 

This will wait for the given xpath for 80 seconds.

Upvotes: 1

Related Questions