Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

[issue] .isDisplayed() returning error "Failed: No element found using locator:" in Firefox, works fine in Chrome #2960

Closed
@amcinerney

Description

@amcinerney

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions