isDisplayed Error: No element found using locator instead of boolean

0 votes

I have a method isElementDisplayed with element.isDisplayed call inside.

It is throwing No element found exception

isElementDisplayed(element: ElementFinder) {

    return element.isDisplayed();

}
Jul 18, 2018 in Selenium by Martin
• 4,210 points
51 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You should check whether an element is present in the DOM or not.

Use isElementPresent() or isPresent(): because isDisplayed() will check that an element is visible or not.

expect(browser.isElementPresent(element(by.id('ELEMENT_ID_HERE')))).toBe(false);

expect(element(by.id('ELEMENT_ID_HERE')).isPresent()).toBe(false);

answered Jul 18, 2018 by Samarpit
• 5,130 points

Related Questions In Selenium

0 votes
1 answer

Selenium XPath error:- Element not found

The reason for Element not found exception ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,030 points
1,489 views
0 votes
1 answer

Is it possible to manually set the attribute value of a Web Element using Selenium?

Yes, its very much possible. You just ...READ MORE

answered May 8, 2018 in Selenium by king_kenny
• 3,590 points
3,237 views
0 votes
1 answer

Get coordinates or dimensions of element with Python using Selenium WebDriver

WebElements have the properties such as .size and .location. ...READ MORE

answered Jul 11, 2018 in Selenium by Meci Matt
• 9,400 points
958 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,030 points
63 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
434 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
51 views
0 votes
1 answer
0 votes
1 answer

How to get next sibling element using XPath and Selenium for Java?

Below code will help you: Try following-sibling axis : WebElement ...READ MORE

answered May 15, 2018 in Selenium by Samarpit
• 5,130 points
3,745 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.