jeudi 2 juillet 2015

Nightwatch.js does not perform a click on a tab

I am using Nightwatch.js to test a website. I want Nightwatch.js to click on a tab on the website, but the click is not working. At least it does not have an effect...

The HTML code of the element to click on looks like this.

<div>
    <ul id="tabs">
        <li id="tiresTab">
            <a href="#tires">Word</a>
        </li>
    </ul>
</div>

In Nightwatch.js I wrote:

.waitForElementVisible('li[id="tiresTab"]', 10000)
.click('li[id="tiresTab"]')

But nothing happens. The tab is not being opened. And the next command in Nightwatch is failing. This means that the click is being performed by Nightwatch, but the tab does not open. However I can open the tab when I manually click it. What could be the problem here?

Aucun commentaire:

Enregistrer un commentaire