These are chat archives for Codeception/CodeceptJS

31st
Oct 2017
gunaytacel
@gunaytacel
Oct 31 2017 16:37
Hi, I am new to using codeceptjs and I am trying to get an attribute value from within a frame. I have tried many different things but nothing seems to work for me. I am most probably using codeceptjs in the wrong way. I also do not know how to use helpers.
if anybody can help let me know how I can grabAttributeFrom within a frame and then use the value it would be appreciated!
this way I can see the link value printed to the console but then I cannot use the link string
within({frame: "#msg_body"}, () => {
activationLink =this.grabAttributeFrom('#activation_link', 'href');
activationLink.then(function(activationLink){
console.log(activationLink);
this.amOnPage(activation_email_link);
}, function (error){
console.error('uh oh:', error);
});
gunaytacel
@gunaytacel
Oct 31 2017 16:42
I used a javascript promise blog and used their format to add the above...
I know its totally wrong but this is the only way so far I can actually get and print the url to the console
also if i try to add let activationLink = yield this.grabAttributeFrom.... it gives me an error: Unexpected strict mode reserved word
gunaytacel
@gunaytacel
Oct 31 2017 18:06
also, is there a way to switch windows using nightmare?