Emna Ayadi
Emna Ayadi

Reputation: 2460

How can i change the visibility of a invisible elements (shown in appium inspector) to true in protractor?

I 'm testing an Angular JS site with protractor and Appium, Recorder details. The click into the login button isn't working as i have mentionned here The problem with click().

loginbutton.isDisplayed().then(function(result){ console.log(result); });

Upvotes: 1

Views: 661

Answers (2)

Emna Ayadi
Emna Ayadi

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

zmii
zmii

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

Related Questions