Chromeless: how to manipulate tabs?

时间:2018-06-04 17:10:38

标签: amazon-web-services testing automated-tests chromeless

I've been developing a web service with chromeless. When I'm interacting with the website, there is a part in the process where a link opens a new tab. I need to interact with the elements of this new tab, but the instance remains in the original tab.

I tried to manipulate the window with javascript with the following instructions:

await chromeless.evaluate(getTabInfo)

function getTabInfo(){
    if(document.hasFocus()){
        alert("Active tab")
    }
    window.close()
}

But I haven't had any success.

What else should I try?

0 个答案:

没有答案