segment-boneyard / nightmare

A high-level browser automation library.
https://open.segment.com
19.55k stars 1.08k forks source link

Can't use inject on meteor project correctly #956

Closed Nisthar closed 7 years ago

Nisthar commented 7 years ago

I am using nightmarejs in my meteor project. I am using it inside my meteor methods in server. So, Its running fine.

But i need jquery injected into the website. I placed the jquery.js in /public/js/jquery.js I can access this file using http://localhost:3000/js/jquery

So, I used below:

nightmare
           .goto(data.url)
           .inject('js','/js/jquery.js')

But it seems that jquery is not working properly.

Anyway, you guys have done a great job in developing this package 👍

Nisthar commented 7 years ago

Ok, I managed to locate the builded jquery.js file in ./../web.browser/app/js/jquery.js.

But don't know if there are any disadvantages in doing this way?

Nisthar commented 7 years ago

Its working now. Can close if there is no other solution.

rosshinkley commented 7 years ago

That is one way, another is using a CDN instead. Going to go ahead and close for now.