Reputation: 2460
I 'm testing an Angular JS site with protractor and Appium, . The click into the login button isn't working as i have mentionned here The problem with click().
Is it possible that because visible = false
from inspector details?
In that case how can i change the visibility of a button into true
?
I get true with that code :
loginbutton.isDisplayed().then(function(result){
console.log(result);
});
Upvotes: 1
Views: 661
Reputation: 2460
This was not the origin problem that the click into login button isn't done as i have expected, i solved it by changing the way when clicking into a button in protractor by this way :
browser.actions().mouseMove(loginButton).click().perform();
Here the Origin of the problem.
Hope that this help you.
Upvotes: 0
Reputation: 4307
I believe you can change any attributes using native Javascript. Protractor can run JavaScript in context of some element. Take a look here.
So the answer probably would be like this:
browser
.executeScript("document.querySelector(<yourElementSelectionPath>).setAttribute('visible', 'true')");
Upvotes: 1