My test case need to interact with three different system, say system A, B, C.
System A, B can be opened on chrome and IE both,but system C being legacy system, can be opened on IE only.
On System A, I have to enter series of some user data which then redirects us to system B (we are integrating system A & B) within same browser. After performing some action on system B, in order to assert status we have to open system C which is legacy application and can be opened only on IE.
Now how can I execute my test case in such a way that opening system A, B on chrome and opening system C on IE.
I am using selenium webdriver with cucumber and serenity
Asked
Active
Viewed 1,715 times
-1

SachinB
- 348
- 6
- 18
-
so all three browsers in different machines at same time? If so, you can do this with selenium grid. – santhosh kumar Sep 13 '17 at 09:21
-
No, Let me rephrase my question – SachinB Sep 13 '17 at 09:21
-
Please share your work – iamsankalp89 Sep 13 '17 at 09:28
-
Serenity manage browser session for user and we no need to write any code for opening browser. So I am not getting where should I declare extra browser i.e. IE – SachinB Sep 13 '17 at 09:30
-
Initiate a new driver with IE. So you will have driver instances. Chrome for system A and B. IE for system C. – santhosh kumar Sep 13 '17 at 09:33
1 Answers
1
QAF supports feature of working with multiple drivers. Since QAF 2.1.11 additional feature of having muliple driver sessions in the same test is added
To have multiple driver session in the same thread/test-case
set driver name using QAFTestBase#setDriver("driverName") For instance,
TestBaseProvider.instance().get().setDriver("chromeDriver");`
//some steps with chrome driver
TestBaseProvider.instance().get().setDriver("iExplorerDriver");`
//some steps with another chrome driver
TestBaseProvider.instance().get().setDriver("chromeDriver");`
//switch back and do some steps with chrome driver
NOTE: If you don't want to quite driver while switch, set driver.name
property instead of set driver.

iscj
- 132
- 7