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

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

Open
nirdavid opened this issue Apr 18, 2018 · 0 comments
Open

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

nirdavid opened this issue Apr 18, 2018 · 0 comments

Comments

@nirdavid
Copy link

nirdavid commented Apr 18, 2018

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

@nirdavid nirdavid changed the title Why should I add wait(timeout) between clicks Chromeless - click(selector) doesn't always work Apr 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant