[issue] .isDisplayed() returning error "Failed: No element found using locator:" in Firefox, works fine in Chrome #2960
Description
Hello, I am currently running protractor tests in both firefox 44 and chrome 48, I have run into an issue several times where elements with display = none return a failure message when using the .isDisplayed() method.
var uploadFileButton = element(by.id('uploadFile')); uploadFileButton.isDisplayed().then(function(result){ if(!result){ //create a new folder and navigate into it }; });
The above code results in the error Failed: No element found using locator: By.id("uploadFile")
This error is strange to me because if I do the same snippet of code in chrome it works. If I do the same snippet of code in firefox but replace .isDisplayed() with .isPresent() then result = false, and I do not get the same error.
Additionally if I do
uploadFileButton.isPresent().then(function(result){
in chrome then result = true.
Has anyone seen this behavior before or know a workaround when working with the two different browsers?
Using protractor version 3.1.1