How to click on a link

512 views
Skip to first unread message

Rita

unread,
May 17, 2016, 8:13:05 AM5/17/16
to NightwatchJs
<i class="fa fa-facebook fa-stack-1x white fa-inverse"></i>


Hi, 

How can I make this clickable with nightwatch?

Thanks


Ashis Rai

unread,
May 17, 2016, 10:39:58 PM5/17/16
to NightwatchJs
There is a NightWatch command called "click" where you can pass css selector. The basic format is .click('css selector')

.click('.fa-stack-1x')

Rita

unread,
May 18, 2016, 12:40:17 PM5/18/16
to NightwatchJs
Thank you Ashis

Eric Mumford

unread,
Jun 7, 2016, 1:03:17 AM6/7/16
to NightwatchJs
Nightwatch won't always be able to click on every selector. Javascript can do all sorts of things in terms of making things clickable dynamically.

If you can't make .click() work then you may need to examine the page and see if jquery is doing something fancy, and possibly write a custom executor for it.

Rita

unread,
Jun 7, 2016, 4:45:25 AM6/7/16
to NightwatchJs
Thank you Eric. I´m new working with nightwatch, so every tip is very welcomed.


terça-feira, 17 de Maio de 2016 às 13:13:05 UTC+1, Rita escreveu:
Reply all
Reply to author
Forward
0 new messages