Determines if an element is visible.

For more info on working with DOM elements in Nightwatch, refer to the Finding & interacting with DOM Elements guide page.
For more info on the new browser.element.find() syntax, refer to the new Element API Overview page.

Usage

                    browser.element.find(selector).isVisible()
                

Example

describe('isVisible demo', function() {
  it('test isVisible', function(browser) {
    browser.element.find('#search')
      .isVisible()
      .assert.equals(true);
  });

  it('test async isVisible', async function(browser) {
    const result = await browser.element.find('#search').isVisible();
    browser.assert.equal(result, true);
  });
});

Returns

Type description
ScopedValue<boolean>

W3C WebDriver spec