nightwatch.js - How to get child elements using NightwatchJs -


how can child element of dropdown using nightwatch js. here code

<ul id="ddemp" class="ng-scope">     <li class="ng-scope active">emp 1</li>     <li class="ng-scope">emp 2</li>     <li class="ng-scope">emp 3</li> </ul> 

i want "emp 3".

you can use nth-child() css selector. in case ul#ddemp li:nth-child(3)

you can use xpath , text in li:

.usexpath().click('//li[text()="emp 3"]')


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -