TransWikia.com

How to configure Phpunit.xml to use multiple browsers in Phpunit test with selenium webdriver

Software Quality Assurance & Testing Asked by Baini.Marouane on February 9, 2021

I’m working on automation test for a big project and I’m using **Phpunit** for functional test and as a server **selenium webdriver**.
I want to execute many tests using **different browsers** , I don’t know what’s the appropriate configuration to addend my objective, it’s in **phpunit.xml** or in the test class, because in the **SetUp() method** I can work only with one browser.
This is my SetUp() method

public function setUp()
{
$capabilities = array(WebDriverCapabilityType::BROWSER_NAME => ‘internet explorer’);
$this->webDriver = RemoteWebDriver::create(‘http://10.157.3.206:4570/wd/hub’,$capabilities);
}
I tried to follow this Link :
http://elnur.pro/using-environment-variables-to-add-flexibility-to-phpunit-tests
But Error is generated , **Class Browser Not found**
Can anyone help me to resolve this ??
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