how to access the data from nightwatch.json file

793 views
Skip to first unread message

Vivian Ho

unread,
May 10, 2014, 2:24:34 AM5/10/14
to nightw...@googlegroups.com
Is there a way to access the data sent to selenium?  Before running a test, I need to know info like launch_url, browserName, and the config section being used.  Thanks for any help.

Vivian Ho

unread,
May 10, 2014, 3:10:32 AM5/10/14
to nightw...@googlegroups.com
Ok saw the options param in lib/index.js now

Dylan Foster

unread,
May 10, 2014, 3:38:59 PM5/10/14
to nightw...@googlegroups.com
If you want to do it during a setUp function it's 
this.client

so in your case it would be

this.client.launch_url

Vivian Ho

unread,
May 13, 2014, 2:02:21 AM5/13/14
to nightw...@googlegroups.com
great, thx

Gary McCann

unread,
Jul 24, 2014, 2:35:43 AM7/24/14
to nightw...@googlegroups.com
Hi Dylan,

Was just wondering is this still the correct way outside of the setUp function i.e. in one of the steps? I have just tried it in a step directly and it works but was just checking its the correct way to go.

Thanks in advance,
Gary

Dylan Foster

unread,
Jul 24, 2014, 11:54:18 AM7/24/14
to nightw...@googlegroups.com
It should work in either case, the only reason I use it in setUp is for global access. I don't want to lose scope of variables like browserName

Kavita Sharda

unread,
Jan 27, 2015, 3:40:51 PM1/27/15
to nightw...@googlegroups.com
I am only able to read launch_url. can you please let me know how do you access browserName , screenshots path etc///?
Reply all
Reply to author
Forward
0 new messages