Need advice about which tool to choose?Ask the StackShare community!

PhantomJS

458
362
+ 1
17
Selenium

9.9K
7.4K
+ 1
513
Add tool

PhantomJS vs Selenium: What are the differences?

Developers describe PhantomJS as "Scriptable Headless WebKit". PhantomJS (www.phantomjs.org) is a headless WebKit scriptable with JavaScript. It is used by hundreds of developers and dozens of organizations for web-related development workflow. On the other hand, Selenium is detailed as "Web Browser Automation". Selenium automates browsers. That's it! What you do with that power is entirely up to you. Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well.

PhantomJS can be classified as a tool in the "Headless Browsers" category, while Selenium is grouped under "Browser Testing".

"Scriptable web browser" is the top reason why over 12 developers like PhantomJS, while over 149 developers mention "Automates browsers" as the leading cause for choosing Selenium.

PhantomJS and Selenium are both open source tools. It seems that PhantomJS with 26.9K GitHub stars and 5.7K forks on GitHub has more adoption than Selenium with 14.7K GitHub stars and 4.92K GitHub forks.

MIT, PedidosYa, and HubSpot are some of the popular companies that use Selenium, whereas PhantomJS is used by Key Location, Ghost Inspector, and Tailor Brands. Selenium has a broader approval, being mentioned in 770 company stacks & 425 developers stacks; compared to PhantomJS, which is listed in 78 company stacks and 47 developer stacks.

Advice on PhantomJS and Selenium
Needs advice
on
WebdriverIO
Selenium
and
Jest
in

we are having one web application developed in Reacts.js. in the application, we have only 4 to 5 pages that we need to test. I am having experience in selenium with java. Please suggets which tool I should use. and why ............................ ............................ .............................

See more
Replies (1)
Prashanth Marappa
Senior Software Engineer at Mphasis ยท | 1 upvotes ยท 65K views
Recommends
Selenium

with the help of selenium we can automate react js for functional testing

See more
Ankur Loriya
Needs advice
on
Puppeteer
and
PhantomJS

I am using Node 12 for server scripting and have a function to generate PDF and send it to a browser. Currently, we are using PhantomJS to generate a PDF. Some web post shows that we can achieve PDF generation using Puppeteer. I was a bit confused. Should we move to puppeteerJS? Which one is better with NodeJS for generating PDF?

See more
Replies (2)
Recommends
Puppeteer

You better go with puppeteer. It is basically chrome automation tool, written in nodejs. So what you get is PDF, generated by chrome itself. I guess there is hardly better PDF generation tool for the web. Phantomjs is already more or less outdated as technology. It uses some old webkit port that's quite behind in terms of standards and features. It can be replaced with puppeteer for every single task.

See more
Recommends
Puppeteer

I suggest puppeteer to go for. It is simple and easy to set up. Only limitaiton is it can be used only for chrome browser and currently they are looking into expanding into FF. The next thing is Playwright which is just a scale up of Puppeteer. It supports cross browsers.

See more
Get Advice from developers at your company using Private StackShare. Sign up for Private StackShare.
Learn More
Pros of PhantomJS
Pros of Selenium
  • 13
    Scriptable web browser
  • 2
    No ECMAScript 6
  • 2
    Depends on QT
  • 167
    Automates browsers
  • 152
    Testing
  • 100
    Essential tool for running test automation
  • 24
    Record-Playback
  • 24
    Remote Control
  • 8
    Data crawling
  • 7
    Supports end to end testing
  • 6
    Functional testing
  • 6
    Easy set up
  • 3
    Easy to integrate with build tools
  • 3
    The Most flexible monitoring system
  • 3
    End to End Testing
  • 2
    Integration Tests
  • 2
    Comparing the performance selenium is faster than jasm
  • 2
    Record and playback
  • 2
    Compatible with Python
  • 2
    Easy to scale
  • 0
    Integrated into Selenium-Jupiter framework

Sign up to add or upvote prosMake informed product decisions

Cons of PhantomJS
Cons of Selenium
    Be the first to leave a con
    • 5
      Flaky tests
    • 1
      Slow as needs to make browser (even with no gui)

    Sign up to add or upvote consMake informed product decisions

    What is PhantomJS?

    PhantomJS (www.phantomjs.org) is a headless WebKit scriptable with JavaScript. It is used by hundreds of developers and dozens of organizations for web-related development workflow.

    What is Selenium?

    Selenium automates browsers. That's it! What you do with that power is entirely up to you. Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use PhantomJS?
    What companies use Selenium?
    See which teams inside your own company are using PhantomJS or Selenium.
    Sign up for Private StackShareLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with PhantomJS?
    What tools integrate with Selenium?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to PhantomJS and Selenium?
    Electron
    With Electron, creating a desktop application for your company or idea is easy. Initially developed for GitHub's Atom editor, Electron has since been used to create applications by companies like Microsoft, Facebook, Slack, and Docker. The Electron framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS. It is based on io.js and Chromium and is used in the Atom editor.
    Protractor
    Protractor is an end-to-end test framework for Angular and AngularJS applications. Protractor runs tests against your application running in a real browser, interacting with it as a user would.
    wkhtmltopdf
    wkhtmltopdf and wkhtmltoimage are command line tools to render HTML into PDF and various image formats using the QT Webkit rendering engine. These run entirely "headless" and do not require a display or display service.
    SlimerJS
    It allows you to manipulate a web page with an external Javascript script: opening a webpage, clicking on links, modifying the content... It is useful to do functional tests, page automation, network monitoring, screen capture etc.
    Puppeteer
    Puppeteer is a Node library which provides a high-level API to control headless Chrome over the DevTools Protocol. It can also be configured to use full (non-headless) Chrome.
    See all alternatives
    Reviews of PhantomJS and Selenium
    CTO at Apna Inc
    Review of
    Selenium

    we at www.cloudqa.io use selenium hub and node architecture to execute our test cases its a very powerful tool to automate web applications.

    How developers use PhantomJS and Selenium
    Kang Hyeon Ku uses
    Selenium

    ๊ฐ€์žฅ ๊ฐ•๋ ฅํ•œ ์›น UI / UX ํ…Œ์ŠคํŠธ ํˆด ์ด์ง€๋งŒ, ๋ฌธ์ œ๋„ ๋งŽ๋‹ค. iframe ์•ˆ์— ์žˆ๋Š” ๊ฑด ์ž˜ select ๊ฐ€ ์•ˆ๋˜๊ธฐ๋„ ํ•˜๊ณ , ํ™”๋ฉด์ด ์ž‘์•„ ์ปดํฌ๋„ŒํŠธ๊ฐ€ ํ™”๋ฉด์— ๋ณด์ด์ง€ ์•Š์œผ๋ฉด ๋˜ select ํ•  ์ˆ˜ ์—†๋‹ค. ํ•˜์ง€๋งŒ ๋ธŒ๋ผ์šฐ์ €๋ฅผ ์žˆ๋Š” ๊ทธ๋Œ€๋กœ ์ œ์–ด ํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒŒ ๊ฐ€์žฅ ํฐ ๋งค๋ ฅ์ด๋‹ค.

    ps. selenide ์™€ ๊ฐ™์ด ์“ฐ๋ฉด ์ฝ”๋“œ๊ฐ€ ๋งŽ์ด ๊ฐœ์„ ๋œ๋‹ค.

    samdfonseca uses
    Selenium

    Maintaining and expanding automated regression tests is one of my primary responsibilities at CrowdTwist. We use Selenium to test the front-end parts of our platform.

    fadingdust uses
    PhantomJS

    We run PhantomJS as part of the CircleCI testing, comparing against other branches to ensure changes are limited to their intended scope.

    Ralic Lo uses
    Selenium

    Used Selenium web-driver for automated QA testing in continuous integration and continuous deployment.

    Owen Miller uses
    Selenium
    • Navigating our site for tests
    • Navigating other sites that discriminate against non-human visitors
    Ataccama uses
    Selenium

    Selenium is a great way to automatically test if a build is sane and can be deployed.

    Nough You uses
    PhantomJS

    Headless browsing, headless chrome is good too, this is not supported anymore.

    ByeongGi uses
    PhantomJS
    • ์›น ํฌ๋กค๋ง(์Šคํ”„๋žฉํ•‘) ๊ณต๋ถ€๋ฅผ ์œ„ํ•ด์„œ ๊ฐ€์ƒ ๋ธŒ๋ผ์šฐ์ ธ์—์„œ ์ œ์ด์ฟผ๋ฆฌ๋ฅผ ๋กœ๋”ฉํ•˜์—ฌ ํŽ˜์ด์Šค๋ถ์—์„œ ๋ฌดํ•œ ์Šคํฌ๋กค์‹œ์— ๋ฐœ์ƒ ํ•˜๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ˆ˜์ง‘ํž˜
    Veggie Sailor uses
    PhantomJS

    Functional tests / screenshots generation.

    Alexpts Pts uses
    PhantomJS