PHP WebDriver assert a condition? -


I have created a test using PHP WebDriver and Selenium. Now I want to make sure that an element contains a certain text. How do I do that? I tried:

  $ web_driver-> Wait (3) - & gt; (WebDriverExpectedCondition :: textToBePresentInElement (WebDriverBy :: cssSelector ('cart-price span.price'), '55, 00 € '));  

But it always ends in an expired exception, there really is no way to use something like this:

  assertTrue (WebDriverExpectedCondition :: textToBePresentInElement (WebDriverBy :: cssSelector ('cart-price span.price'), '55, 00 €))  

Thanks for your help!

If you use PHP, you will have

 in your PHP.ini file  max_execution_time  

may have to be replaced.

This number determines the PHP script can run for seconds.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -