Answer the question
In order to leave comments, you need to log in
What is the best way to run selenium php or js tests?
Previously, there was little experience in writing tests through js. Now I tried to do it also within the framework of phpunit PHPUnit_Extensions_Selenium2TestCase,
but somehow writing getByClassName or click() in php looks a little perverse
. Are there any arguments in favor of something?
and another question in passing - how to determine whether it is possible to physically click on the button? want to check that it's visible, that it's not covered by another element that has a higher z-index, or that it's within the screen?
also with a modal window - how to check that the modal has appeared on the screen?
Thank you
Answer the question
In order to leave comments, you need to log in
I wrote tests at
https://www.npmjs.com/package/selenium-webdriver
,
it's convenient for me because my development environment + fastened the packages I needed.
I think the main fact should be the code convention in the team.
If by yourself and for yourself, then why not try something new.
Well, or make it depend on the task and your knowledge in the language and development environment.
codeception.
You can check visibility like this
public function seePageHasElement($element)
{
$I = $this;
try {
$I->seeElement($element);
} catch (\PHPUnit_Framework_AssertionFailedError $f) {
return false;
}
return true;
}
and another question in passing - how to determine whether it is possible to physically click on the button? want to check that it's visible, that it's not covered by another element that has a higher z-index, or that it's within the screen?
also with a modal window - how to check that the modal has appeared on the screen?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question