I'm working on following scenario with WebDriver Sampler in Jmeter on javascript:
perform several requests in main window;
for 1 specific transaction:
2.1. - switch from initial window to newly created window (both windows have the same title),
2.2. - allow mic and cam (browser dialog box appears after new window is open and blocks activity of some page elements until cam and mic will not be allowed),
2.3. - find elements on page and perform actions with them (I wrote javascript snippets for that),
2.4. - close this 2nd window;
return back to initial main window;
proceed with requests in main window.
For steps 1 and 4 I have in js code all I need.
For step3, I suppose to use solution:
//switch back to initial main window:
WDS.browser.switchTo().defaultContent();
But I'm still stack on 2.1 and 2.2.
What is the best solution with 2.1, 2.2 and 2.4?
For 2.2. I tried to use "Set Preferences" section in Firefox WebDriver config and populate it with following:
Disadvantages: 1st - unfortunatelly, it doesn't work, and 2nd - I need these preferences working with Chrome, not only in FF.
Could you provide helpful tips, please, with 2.1, 2.2, 2.4?