5

Please share if anyone used Selenium to get server side errors.

7
  • If you know error behavior in advance then you can specify in webdriver code.So in future if same error occur then your selenium web driver will indicate. Commented Feb 25, 2015 at 5:49
  • Here's the link which gives me php error: selenium.couponapitest.com/page-2.php. Could you please explain how can i handle this with webdriver code?. Thank you Commented Feb 25, 2015 at 5:55
  • you define one common element which is in every page and then when load page at that time check that if you are getting that element or not.if not then there is some error on page. Commented Feb 25, 2015 at 5:59
  • But that could not help to find the specific error. E.g.- error could be due to 404 status code, php error etc. How can i be sure that it is a php error? Commented Feb 25, 2015 at 6:05
  • I do not think you can find specific using selenium.Still wait for other reply.May be some expert can help you. Commented Feb 25, 2015 at 6:07

1 Answer 1

0

PHPUnit allows to add checks that are run before or after every test function. Just add a assertPreConditions() or assertPostConditions() to your test to see if there are traces of PHP failure.

See http://phpunit.de/manual/3.7/en/fixtures.html for some more details.

Sign up to request clarification or add additional context in comments.

1 Comment

Selenium is integration tests. PHPUnit is unit tests. I don't think you can use PHPUnit stuff for Selenium.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.