I'm using Protractor tool, and coding is done in JavaScript. Scenario- Go to -https://ift.tt/38CPY0y
Click on Contribute Now button->Fill the form with valid inputs-> And click on Proceed to pay button-> Click on Netbanking -> And click on any Bank
I'm not able to click on the bank button
Line of code-
it('Test with NetBanking Options', function ()
{
var elm3 = element(by.xpath("//app-main-payment[@class='ng-star-inserted'] //span[contains(text(),'Net Banking')]"));
browser.executeScript("arguments[0].click()", elm3);
browser.sleep(6000);
//element(by.className("mat-stroked-button NB_ICICI")).click();
//var elm4 = element(by.xpath("//div[@class='mat-button-ripple mat-ripple'] //div[contains(text(),'HDFC')]"));
// browser.executeScript("arguments[0].click()", elm4);
// var elm5 =element(by.xpath("//section[@class='ng-star-inserted'] //button[@class='mat-stroked-button NB_AXIS']"));
//var elm5 =element(by.xpath("//section[@class='ng-star-inserted'] //div[contains(text(),'HDFC')]"));
var elm5 =element(by.xpath("//div[@class='bank-icons ng-star-inserted'] //button[@class='mat-stroked-button NB_AXIS']"));
browser.executeScript("arguments[0].click()", elm5);
browser.sleep(5000);
browser.getCurrentUrl().then(function(url){
if(url.indexOf("axis") >= 0 ){
console.log("Payment with NetBanking option passed Successfully!");
}else{
console.log("Payment with NetBanking Option Failed");
}
})
browser.sleep(5000);
})
As shown above, I have tried multiple locators combination but I'm getting only one error message-
"Element is not interactable"
Please help, thanks in advance
Aucun commentaire:
Enregistrer un commentaire