标签: selenium-webdriver cucumber webdriver-io
我喜欢下面的dom,我能够得到第一个元素
这就是我想要获得第二和第三个元素但是变为空
这是我的黄瓜步骤定义中的实际代码。
When('I click on an option', async function() { const items = '.entry'; await browser.waitForExist(items); await browser.click('.entry:nth-child(2)'); });