Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interaction to close pop-up windows #66

Closed
marktigno opened this issue Jun 16, 2017 · 0 comments
Closed

Interaction to close pop-up windows #66

marktigno opened this issue Jun 16, 2017 · 0 comments
Labels
enhancement A good idea that should be implemented @serenity-js/protractor Adapter and interactions for Angular Protractor

Comments

@marktigno
Copy link

marktigno commented Jun 16, 2017

Hello @jan-molak. Just what you said on the comment on fdedf8a#commitcomment-22567148, is there a way to close a web browser tab/window without using native protractor commands directly? :)

{
    protractor.browser.getAllWindowHandles().then(function(handles) {
    protractor.browser.switchTo().window(handles[handles.length - 1]).then(function() {
        //some implementing codes
    }),
    protractor.browser.close(), // <--this is what I mean
    protractor.browser.switchTo().window(handles[0])
}
@jan-molak jan-molak added the enhancement A good idea that should be implemented label Jun 17, 2017
@jan-molak jan-molak changed the title Adding capability to close browser tab/window Adding capability to close pop-up windows Mar 14, 2020
@jan-molak jan-molak added the @serenity-js/protractor Adapter and interactions for Angular Protractor label Mar 14, 2020
@jan-molak jan-molak changed the title Adding capability to close pop-up windows Interaction to close pop-up windows Mar 14, 2020
@jan-molak jan-molak added this to To do in Serenity/JS Board Mar 14, 2020
@jan-molak jan-molak moved this from To do to In progress in Serenity/JS Board Oct 4, 2020
Serenity/JS Board automation moved this from In progress to Done Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A good idea that should be implemented @serenity-js/protractor Adapter and interactions for Angular Protractor
Projects
Development

No branches or pull requests

2 participants