Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.7k points)

I have a problem with PHPUnit_Selenium in Opera. If I have clicked on an element in my test code, the page will not load. In other browsers such as Firefox, IE, Chrome, and Safari, it works correctly.

Code:

$browser->clickAndWait(link);

It's the next steps from SELENIUM REMOTE CONTROL:

click(link)

waitForPageToLoad(120000)

After a timeout, if I click on the link in the browser the page is reloaded.

I have Selenium RC v. 2.31.0 and Opera version 12.41, but I test also on Opera 11.50.

Do you have any idea what is wrong?

1 Answer

0 votes
by (62.9k points)

I have had a similar issue in Firefox, below is the solution that I came up with:

 def wait_for_element_by_id(eid):

   "Wait for an element to be present"

   element = WebDriverWait(driver, 10).until(

       EC.presence_of_element_located((By.ID, eid))

   )

   return []

I hope this helps!

Browse Categories

...