question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New Keyword 'Is Element Visible'

See original GitHub issue

Copied from ExtendedSelenium2Library:

@keyword
    def is_element_visible(self, locator):
        """Returns element visibility identified by ``locator``.

        Arguments:
        - ``locator``: The locator to find requested element. Key attributes for
                       arbitrary elements are ``id`` and ``name``. See `introduction` for
                       details about locating elements.

        Examples:
        | Is Element Visible | css=div.class |
        """
        return self.is_visible(locator)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
pekkaklarckcommented, May 23, 2018

It’s easy to add this kind of Is keywords, but for consistency reasons they should be added for all/most Should keywords and I’m not sure is that worth the effort. You can already now use Run Keyword And Return Status to turn any failure into False:

${is visible} =    Run Keyword And Return Status    Element Should Be Visible    id:example

It might be possible to add some generic way to configure all SL library’s Should keywords to return status instead of failing by utilizing the dynamic API that SL nowadays uses. I could work something like this:

${is visible} =    Element Should Be Visible    id:example    return_status=True    
1reaction
johannocommented, May 23, 2018

Should, raises an Error. Is Element Visible returns false instead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Robot Framework If element is visible execute a keyword
I need to run a "Run Keyword If" to identify if this element exists and if so to execute another keyword. I tried...
Read more >
How to check if element is optically visible in Selenium2Library
Verifies that the element identified by locator is visible. Herein, visible means that the element is logically visible, not optically visible in the ......
Read more >
visibility - CSS: Cascading Style Sheets - MDN Web Docs
The visibility CSS property shows or hides an element without changing the layout of a document. The property can also hide rows or...
Read more >
SeleniumLibrary - Robot Framework
SeleniumLibrary is a web testing library for Robot Framework. This document explains how to use keywords provided by SeleniumLibrary.
Read more >
[WebUI] Verify Element Visible - Katalon Docs
For up-to-date documentation, see the latest version (current). Katalon Studio Enterprise; Keywords; Web UI Keywords; [ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found