Skip to content
This repository was archived by the owner on Nov 24, 2018. It is now read-only.
This repository was archived by the owner on Nov 24, 2018. It is now read-only.

Chromeless - click(selector) doesn't always work #430

@nirdavid

Description

@nirdavid

After creating new chromeless object:

const chromeless = new Chromeless( { implicitWait: true, scrollBeforeClick: true })

When I use chromeless.click(selector) on some element in the DOM, for example:

await chromeless.click('[automation="backgroundButtons"] button:nth-child(1)')

I receive timeout exception:

Error: wait("[automation="backgroundButtons"] button:nth-child(1)") timed out after 10000ms

However, when I click the same element with chromeless.evaluate method:

function chooseBackgroundColor() {
  document.querySelectorAll('[automation="backgroundButtons"] button:nth-child(1)')[0].click()
}

await chromeless.evaluate(chooseBackgroundColor)

It works absolutely fine. Any ideas why? It reproduces for some other elements.

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions