{"action":"created","issue":{"url":"https://api.github.com/repos/jan-molak/serenity-js/issues/71","repository_url":"https://api.github.com/repos/jan-molak/serenity-js","labels_url":"https://api.github.com/repos/jan-molak/serenity-js/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/jan-molak/serenity-js/issues/71/comments","events_url":"https://api.github.com/repos/jan-molak/serenity-js/issues/71/events","html_url":"https://github.com/jan-molak/serenity-js/issues/71","id":239384571,"number":71,"title":"Interacting with alert windows","user":{"login":"marktigno","id":13494822,"avatar_url":"https://avatars2.githubusercontent.com/u/13494822?v=3","gravatar_id":"","url":"https://api.github.com/users/marktigno","html_url":"https://github.com/marktigno","followers_url":"https://api.github.com/users/marktigno/followers","following_url":"https://api.github.com/users/marktigno/following{/other_user}","gists_url":"https://api.github.com/users/marktigno/gists{/gist_id}","starred_url":"https://api.github.com/users/marktigno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marktigno/subscriptions","organizations_url":"https://api.github.com/users/marktigno/orgs","repos_url":"https://api.github.com/users/marktigno/repos","events_url":"https://api.github.com/users/marktigno/events{/privacy}","received_events_url":"https://api.github.com/users/marktigno/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-06-29T07:05:20Z","updated_at":"2017-06-29T07:19:49Z","closed_at":null,"body":"Hello! Is there a way to interact with the browser's alert windows and click either OK or Cancel button on it? The only way that I can do this is to use native protractor command like this:\r\n     \r\n    protractor.browser.switchTo().alert().accept();\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/jan-molak/serenity-js/issues/comments/311883721","html_url":"https://github.com/jan-molak/serenity-js/issues/71#issuecomment-311883721","issue_url":"https://api.github.com/repos/jan-molak/serenity-js/issues/71","id":311883721,"user":{"login":"marktigno","id":13494822,"avatar_url":"https://avatars2.githubusercontent.com/u/13494822?v=3","gravatar_id":"","url":"https://api.github.com/users/marktigno","html_url":"https://github.com/marktigno","followers_url":"https://api.github.com/users/marktigno/followers","following_url":"https://api.github.com/users/marktigno/following{/other_user}","gists_url":"https://api.github.com/users/marktigno/gists{/gist_id}","starred_url":"https://api.github.com/users/marktigno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marktigno/subscriptions","organizations_url":"https://api.github.com/users/marktigno/orgs","repos_url":"https://api.github.com/users/marktigno/repos","events_url":"https://api.github.com/users/marktigno/events{/privacy}","received_events_url":"https://api.github.com/users/marktigno/received_events","type":"User","site_admin":false},"created_at":"2017-06-29T07:19:49Z","updated_at":"2017-06-29T07:19:49Z","body":"Yeah I saw you comments there, but I have a way to work out this using TypeScript version 2.3.4. Here's the working code I did:\r\n\r\n    export class DeleteAddress implements Task {\r\n         static click(addressName) {\r\n             return new DeleteAddress(addressName);\r\n        }\r\n\r\n        @step('{0} deletes the selected address named #addressName')\r\n        performAs(actor: PerformsTasks): PromiseLike<void> {\r\n            var ptor = protractor.browser;\r\n            return actor.attemptsTo(\r\n                Click.on(ProfilePageComponent.Delete_address_button(this.addressName))\r\n             ), \r\n            ptor.switchTo().alert().accept();\r\n        }\r\n\r\n        constructor(private addressName: string) {}\r\n    }\r\n\r\nBut this code won't work anymore on the latest version of TypeScript (v2.4.1)."}}
{"actor":{"display_login":"marktigno"}}