Wednesday, 19 December 2018

How to execute one element then and then another in protractor

This following code behaving randomly sometime it works fine and sometime it throws error like this Stale Element Reference Exception

what i want is i want to get this below executed first

element(by.id('FiltItemTransDocNo')).sendKeys(grno);

after above i want this to get executed this below

element.all(by.name('chkGrd')).first().click();

i have tried this way but it didnt seems to work

element(by.id('FiltItemTransDocNo')).sendKeys(grno).then(function(el){
     element.all(by.name('chkGrd')).first().click();
});

help me out with this

i have attached the image i am sending keys to Purchase Rquisition field and according i came up with result which will show only one result and i want to click and if i will put condition for visiblity it will always be true then i will lead to same issue enter image description here



from How to execute one element then and then another in protractor

No comments:

Post a Comment