I am executing my Jmeter test with Selenium and once I click on an Analysis link, it ideally opens up in a new tab on the same browser window. However, If I am click on the link using Jmeter Selenium, it does not start a new tab, rather, the analysis opens up on a new browser instance. Can anyone please specify how to modify the script so that the analysis opens up on a new tab rather than a browser window? I am forced to modify my script and switch handles due to this

var handles = WDS.browser.getWindowHandles() 
var iterator = handles.iterator()
var currentHandle = WDS.browser.getWindowHandle()
while(iterator.hasNext()) {
    var handle = iterator.next() 
    if (handle != currentHandle) {

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.