TransWikia.com

How to add an assert to an if ..else condition using Phpunit and selenium webdriver

Software Quality Assurance & Testing Asked on October 25, 2021

I’m working on test automation for a big project and I’m using Phpunit and as a server I’m using selenium webdriver.
In the source code I’m using asserts like :

$this->assertContains('Project Title', $this->webDriver->getTitle());

I’m wondering how can I add the if-else condition that when it’s false I can have a popup or to stop the test.
Thank you.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP