These are chat archives for rosshinkley/nightmare

21st
Jun 2016
gatsbylee
@gatsbylee
Jun 21 2016 00:33
hello.
thx for nightmare project :)
Ross Hinkley
@rosshinkley
Jun 21 2016 01:58
hello
:)
Brandon Wilhite
@JediMindtrick
Jun 21 2016 02:09
@rosshinkley thanks
@rosshinkley if i go this route, i'll let you know how it goes
Ross Hinkley
@rosshinkley
Jun 21 2016 02:10
@JediMindtrick no problem, i'd be curious to know what kind of hoops it'll require :)
i'd appreciate it! :)
gatsbylee
@gatsbylee
Jun 21 2016 03:01
hello, I just started using Nightmare. I'm wondering if I can use xPath to click sth on page. :)
Ross Hinkley
@rosshinkley
Jun 21 2016 03:06
@gatsbylee not out of the box
.click() uses document.querySelector() to get the element to click on, but you could probably roll your own using document.evaluate()
gatsbylee
@gatsbylee
Jun 21 2016 03:08
@rosshinkley yes. I took a look .click and .exist function and saw that it is using querySelector.
@rosshinkley maybe for now, I just need to use CSS selector. Later add some kind of xPath library to use with Nightmare. thx for your response. :)
Ross Hinkley
@rosshinkley
Jun 21 2016 03:09
you don't need to use an external library, i don't think
you certainly can, but you should be able to use XPath without anything special
the bigger issue would be adding methods with .action() that use document.evaluate() or the XPath library instead of document.querySelector(), i'd think
gatsbylee
@gatsbylee
Jun 21 2016 03:12
@rosshinkley yeap you are right.
@rosshinkley however, I'd like have a function returns DOM object based on the given xPath. :)
Ross Hinkley
@rosshinkley
Jun 21 2016 03:13
i have to ask: what are you trying to do with xpath that you can't do with a css selector?
gatsbylee
@gatsbylee
Jun 21 2016 03:13
BTW, I didn't expect that somebody really reply back to my msg.
Ross Hinkley
@rosshinkley
Jun 21 2016 03:13
surprise! ;)
gatsbylee
@gatsbylee
Jun 21 2016 03:13
haha.. you made me surprised. :)
xpath..well. I used to love CSS selector a lot since I didn't know about xPath. However, since I started using xPath 2yr(?), I just use xPath. It's much more flexible.
@rosshinkley I might port sth from CasperJS.
@rosshinkley thx for comment though :)
Ross Hinkley
@rosshinkley
Jun 21 2016 03:17
np
Brandon Wilhite
@JediMindtrick
Jun 21 2016 12:27
@rosshinkley i think i've decided on plain ol' phantomjs on aws lambda, b/c there's a template for it and all
however, i really like this project and i think i'll start using this at work for ui testing and encouraging others to do the same
i really like how simple it was to get going...far smoother than other solutions i've tried in the past
Sammy Yu
@sammyyu
Jun 21 2016 16:22
is it possible to get to the chrome://flags/ page from nightmare?
Ross Hinkley
@rosshinkley
Jun 21 2016 21:39
@sammyyu not presently. chrome isn't a recognized protocol.
what are you trying to do?
Sammy Yu
@sammyyu
Jun 21 2016 23:02
@rosshinkley I'm trying to disable-quic via command line I want to confirm that it has been disabled