-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[issue] .isDisplayed() returning error "Failed: No element found using locator:" in Firefox, works fine in Chrome #2960
Comments
|
Update: I was able to fix the issue, what I needed to do was ad an expected condition to wait for the element to be present in the DOM before doing the .isDisplay() check. For whatever reason firefox handles this type of scenario poorly compared to chrome. I'm not sure if this is something fixable or not, but I will let someone else close this ticket once they have read and can confirm this is acceptable behavior.
|
Sounds like a bug in either Firefox or Selenium. If you have a chance, I'd be interested if earlier versions of Firefox show the same issue. Thanks. |
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
The text was updated successfully, but these errors were encountered: