pillaiindu

pillaiindu

Copied from my Stackoverflow question:

I was using Phantomjs with Phoenix framework for test, and the package I use in phoenix is hound. I previously installed phantomjs with apt-get which was giving problems (this github comment said the installation method was the culprit), so I downloaded the latest binary from the official website but that was giving permissions denied error, so I had to build it from the source, but to my surprise the build.py which is mentioned in the official guide wasn’t avaialble, so I even failed to build it that way. I also failed to install through npm, so I gave up on phantomjs.

Now I installed slimerjs, but I don’t know what is slimerjs’s alternative command to phantomjs --wd.

Showing Posts 1 to 3

DevotionGeo

DevotionGeo

You can also use chrome-driver with hound. I won’t call it a truly headless experience, as it will show you a blink of the webpage, but it works.
You have to follow the following steps.

  1. Download chrome driver.
  2. Run it. (through terminal, or just double click it)
  3. change config :hound, driver: "phantomjs" to config :hound, driver: "chrome_driver" in your config/test.exs.

done.

pillaiindu

pillaiindu OP

Yes, chrome driver shows Chrome browser for a moment which is annoying, but it’s OK, because I can continue learning Phoenix. :slight_smile:

Thank You!

DevotionGeo

DevotionGeo

Today I made phantomjs work by installing it through npm with the command sudo npm install -g phantomjs-prebuilt --unsafe-perm=true --allow-root (as it was getting failed with sudo npm install -g phantomjs-prebuilt).

Using chrome driver was a pain, as it was showing a blink of the page for every single acceptance test, and was slow if you had more than a few tests.

I rushed to the Forum to share it with others, thinking it may be beneficial to others facing the same problem.

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
ryanwinchester
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted” Version...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews