SlideShare a Scribd company logo
Introduction to

Console.log('Erol Seliektay');
What is
●

●
●

PhantomJS is a headless WebKit scriptable
with a JavaScript API.
Created by Ariya Hidayat. (http://ariya.ofilabs.com)
PhantomJS itself is NOT a test framework, it is
only used to launch the tests via suitable test
runner.
What Exactly Headless WebKit
●

●

WebKit is the layout engine that designed to
allow web browsers to render web pages.
Chrome, Safari and a couple of other browsers
also use WebKit.
Actually, PhantomJS is a browser but a
headless browser. This means that the
rendered web pages are never displayed.
Use Cases
●

●

●

●

Headless web testing. Lightning-fast testing without the
browser. Various test frameworks such as Jasmine,
Capybara, QUnit, Mocha, WebDriver, YUI Test, BusterJS,
FuncUnit, Robot Framework, and many others are
supported.
Page automation. Access and manipulate web pages with
the standard DOM API, or with usual libraries like jQuery.
Screen capture. Programmatically capture web contents,
including CSs, SVG and Canvas. Build server-side web
graphics apps, from a screenshot service to a vector chart
rasterizer.
Network monitoring. Automate performance analysis, track
page loading and export as standard HAR format.
Features
●

●

●

●

Multiplatform, available on major operating
systems: Windows, Mac OS X, Linux, other
Unices.
Fast and native implementation of web
standards: DOM, CSS, JavaScript, Canvas,
SVG. No emulation!
Pure headless (no X11) on Linux, ideal for
continuous integration systems. Also runs on
Amazon EC2, Heroku, Iron.io.
Easy to install.
Ecosystem
PhantomJS needs not be used only as a stand-alone tool.
Check also some excellent related projects:
●

●

●

●

●

●

CasperJS enables easy navigation scripting and common highlevel testing.
Poltergeist allows running Capybara tests headlessly.
Guard::Jasmine automatically tests Jasmine specs on Rails
when files are modified.
GhostDriver complements Selenium tests with a PhantomJS
WebDriver implementation.
PhantomRobot runs Robot Framework acceptance tests in the
background via PhantomJS.
Mocha-PhantomJS run Mocha tests using PhantomJS.
How to Download and Set Up
●

Go http://phantomjs.org/download.html

●

Download phantomjs-x.x.x-windows.zip

●

Unzip the folder

●

Set the path:
1.From the Desktop, right click Computer and click Properties.
2. Click Advanced System Settings
3.Click Environment Variables... button
4.Select Path in System variables and click Edit button
5.Copy and Paste the location of phantomjs folder. Ex; in my
case: “C:UserserolToolsphantomjs-1.9.2-windows”
6. Click OK buttons.
How to Run
●

Create a text file that contains the following
lines:
console.log('Radiohead is Awesome, by the way Hi World!');
phantom.exit();

●

Save it as hi.js

●

Run it from command prompt like this;
phantomjs hi.js

●

The output is:
Radiohead is Awesome, by the way Hi World!
Examples
●

It captures screenshot with given width and
height also get the page title.
Examples
This script shows the number of twitter followers for a specific account.
Thanks
For more information visit:
●

https://github.com/ariya/phantomjs/wiki
Ad

More Related Content

What's hot (20)

General Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScriptGeneral Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScript
Spike Brehm
 
Test Automation using Ruby, Watir, Rspec and AutoIT for GAMESCALE products te...
Test Automation using Ruby, Watir, Rspec and AutoIT for GAMESCALE products te...Test Automation using Ruby, Watir, Rspec and AutoIT for GAMESCALE products te...
Test Automation using Ruby, Watir, Rspec and AutoIT for GAMESCALE products te...
Sla Va
 
Isomorphic JavaScript with Nashorn
Isomorphic JavaScript with NashornIsomorphic JavaScript with Nashorn
Isomorphic JavaScript with Nashorn
Maxime Najim
 
WebAssembly Fundamentals
WebAssembly FundamentalsWebAssembly Fundamentals
WebAssembly Fundamentals
Knoldus Inc.
 
Kickstarter Your Node.JS Application
Kickstarter Your Node.JS ApplicationKickstarter Your Node.JS Application
Kickstarter Your Node.JS Application
Hengki Sihombing
 
Cpsc 473 01 lightning talk
Cpsc 473 01 lightning talkCpsc 473 01 lightning talk
Cpsc 473 01 lightning talk
Ketul Shah
 
Selenium webdriver
Selenium webdriverSelenium webdriver
Selenium webdriver
sean_todd
 
Web driver training
Web driver trainingWeb driver training
Web driver training
Dipesh Bhatewara
 
Lazy angular w/ webpack
Lazy angular w/ webpackLazy angular w/ webpack
Lazy angular w/ webpack
Rich Snapp
 
VorlonJS
VorlonJSVorlonJS
VorlonJS
Fabrício Catae
 
Web development using nodejs
Web development using nodejsWeb development using nodejs
Web development using nodejs
Vaisakh Babu
 
Testing Mobile JavaScript
Testing Mobile JavaScriptTesting Mobile JavaScript
Testing Mobile JavaScript
jeresig
 
Resftul API Web Development with Django Rest Framework & Celery
Resftul API Web Development with Django Rest Framework & CeleryResftul API Web Development with Django Rest Framework & Celery
Resftul API Web Development with Django Rest Framework & Celery
Ridwan Fadjar
 
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Eirik Vullum
 
Browser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.jsBrowser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.js
Luís Bastião Silva
 
Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack Introduction
Anjali Chawla
 
Better End-to-End Testing with Page Objects Model using Protractor
Better End-to-End Testing with Page Objects Model using ProtractorBetter End-to-End Testing with Page Objects Model using Protractor
Better End-to-End Testing with Page Objects Model using Protractor
Kasun Kodagoda
 
Demo tests unitaires karma jasmine - strasbourg js - decembre 2016
Demo tests unitaires karma jasmine - strasbourg js - decembre 2016Demo tests unitaires karma jasmine - strasbourg js - decembre 2016
Demo tests unitaires karma jasmine - strasbourg js - decembre 2016
kraeger
 
Sails.js Intro
Sails.js IntroSails.js Intro
Sails.js Intro
Nicholas Jansma
 
Full stack web development with c# and web assembly - Blazor.Net
Full stack web development with c# and web assembly - Blazor.NetFull stack web development with c# and web assembly - Blazor.Net
Full stack web development with c# and web assembly - Blazor.Net
Ruwantha Ratnayake
 
General Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScriptGeneral Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScript
Spike Brehm
 
Test Automation using Ruby, Watir, Rspec and AutoIT for GAMESCALE products te...
Test Automation using Ruby, Watir, Rspec and AutoIT for GAMESCALE products te...Test Automation using Ruby, Watir, Rspec and AutoIT for GAMESCALE products te...
Test Automation using Ruby, Watir, Rspec and AutoIT for GAMESCALE products te...
Sla Va
 
Isomorphic JavaScript with Nashorn
Isomorphic JavaScript with NashornIsomorphic JavaScript with Nashorn
Isomorphic JavaScript with Nashorn
Maxime Najim
 
WebAssembly Fundamentals
WebAssembly FundamentalsWebAssembly Fundamentals
WebAssembly Fundamentals
Knoldus Inc.
 
Kickstarter Your Node.JS Application
Kickstarter Your Node.JS ApplicationKickstarter Your Node.JS Application
Kickstarter Your Node.JS Application
Hengki Sihombing
 
Cpsc 473 01 lightning talk
Cpsc 473 01 lightning talkCpsc 473 01 lightning talk
Cpsc 473 01 lightning talk
Ketul Shah
 
Selenium webdriver
Selenium webdriverSelenium webdriver
Selenium webdriver
sean_todd
 
Lazy angular w/ webpack
Lazy angular w/ webpackLazy angular w/ webpack
Lazy angular w/ webpack
Rich Snapp
 
Web development using nodejs
Web development using nodejsWeb development using nodejs
Web development using nodejs
Vaisakh Babu
 
Testing Mobile JavaScript
Testing Mobile JavaScriptTesting Mobile JavaScript
Testing Mobile JavaScript
jeresig
 
Resftul API Web Development with Django Rest Framework & Celery
Resftul API Web Development with Django Rest Framework & CeleryResftul API Web Development with Django Rest Framework & Celery
Resftul API Web Development with Django Rest Framework & Celery
Ridwan Fadjar
 
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
Eirik Vullum
 
Browser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.jsBrowser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.js
Luís Bastião Silva
 
Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack Introduction
Anjali Chawla
 
Better End-to-End Testing with Page Objects Model using Protractor
Better End-to-End Testing with Page Objects Model using ProtractorBetter End-to-End Testing with Page Objects Model using Protractor
Better End-to-End Testing with Page Objects Model using Protractor
Kasun Kodagoda
 
Demo tests unitaires karma jasmine - strasbourg js - decembre 2016
Demo tests unitaires karma jasmine - strasbourg js - decembre 2016Demo tests unitaires karma jasmine - strasbourg js - decembre 2016
Demo tests unitaires karma jasmine - strasbourg js - decembre 2016
kraeger
 
Full stack web development with c# and web assembly - Blazor.Net
Full stack web development with c# and web assembly - Blazor.NetFull stack web development with c# and web assembly - Blazor.Net
Full stack web development with c# and web assembly - Blazor.Net
Ruwantha Ratnayake
 

Viewers also liked (20)

ISTQB Foundation Level Basic
ISTQB Foundation Level BasicISTQB Foundation Level Basic
ISTQB Foundation Level Basic
Erol Selitektay
 
Genel Bir Ulaştırma Probleminin AMPL İle Çözümü
Genel Bir Ulaştırma Probleminin AMPL İle ÇözümüGenel Bir Ulaştırma Probleminin AMPL İle Çözümü
Genel Bir Ulaştırma Probleminin AMPL İle Çözümü
Erol Selitektay
 
Phantom js quick start
Phantom js quick startPhantom js quick start
Phantom js quick start
ji guang
 
Owning Web Performance with PhantomJS 2 - Fluent 2016
Owning Web Performance with PhantomJS 2 - Fluent 2016Owning Web Performance with PhantomJS 2 - Fluent 2016
Owning Web Performance with PhantomJS 2 - Fluent 2016
Wesley Hales
 
Learn Software Testing for ISTQB Foundation Exam
Learn Software Testing for ISTQB Foundation ExamLearn Software Testing for ISTQB Foundation Exam
Learn Software Testing for ISTQB Foundation Exam
Yogindernath Gupta
 
Сертификация ISTQB
Сертификация ISTQBСертификация ISTQB
Сертификация ISTQB
SQALab
 
Mobility testing overview and instructions
Mobility testing overview and instructionsMobility testing overview and instructions
Mobility testing overview and instructions
Alextyur
 
Istqb benefits
Istqb benefitsIstqb benefits
Istqb benefits
Alextyur
 
An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.
BugRaptors
 
Introduction to ISTQB & ISEB Certifications
Introduction to ISTQB & ISEB CertificationsIntroduction to ISTQB & ISEB Certifications
Introduction to ISTQB & ISEB Certifications
Yogindernath Gupta
 
ISTQB / ISEB Foundation Exam Practice - 6
ISTQB / ISEB Foundation Exam Practice - 6ISTQB / ISEB Foundation Exam Practice - 6
ISTQB / ISEB Foundation Exam Practice - 6
Yogindernath Gupta
 
ISTQB / ISEB Foundation Exam Practice - 5
ISTQB / ISEB Foundation Exam Practice - 5ISTQB / ISEB Foundation Exam Practice - 5
ISTQB / ISEB Foundation Exam Practice - 5
Yogindernath Gupta
 
ParisJS #10 : PhantomJs
ParisJS #10 : PhantomJs ParisJS #10 : PhantomJs
ParisJS #10 : PhantomJs
Maurice Svay
 
ISTQB / ISEB Foundation Exam Practice - 4
ISTQB / ISEB Foundation Exam Practice - 4ISTQB / ISEB Foundation Exam Practice - 4
ISTQB / ISEB Foundation Exam Practice - 4
Yogindernath Gupta
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriver
Anuraj S.L
 
昔むかし、あるところでPhantom jsに助けられた話
昔むかし、あるところでPhantom jsに助けられた話昔むかし、あるところでPhantom jsに助けられた話
昔むかし、あるところでPhantom jsに助けられた話
Yuki Kuramochi
 
Automated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumAutomated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and Selenium
Dev9Com
 
Istqb foundation level day 1
Istqb foundation level   day 1Istqb foundation level   day 1
Istqb foundation level day 1
Shuchi Singla AKT,SPC4,PMI-ACP,ITIL(F),CP-AAT
 
Когда стоит закончить автоматизировать?
Когда стоит закончить автоматизировать?Когда стоит закончить автоматизировать?
Когда стоит закончить автоматизировать?
SQALab
 
ISTQB Foundation Level Basic
ISTQB Foundation Level BasicISTQB Foundation Level Basic
ISTQB Foundation Level Basic
Erol Selitektay
 
Genel Bir Ulaştırma Probleminin AMPL İle Çözümü
Genel Bir Ulaştırma Probleminin AMPL İle ÇözümüGenel Bir Ulaştırma Probleminin AMPL İle Çözümü
Genel Bir Ulaştırma Probleminin AMPL İle Çözümü
Erol Selitektay
 
Phantom js quick start
Phantom js quick startPhantom js quick start
Phantom js quick start
ji guang
 
Owning Web Performance with PhantomJS 2 - Fluent 2016
Owning Web Performance with PhantomJS 2 - Fluent 2016Owning Web Performance with PhantomJS 2 - Fluent 2016
Owning Web Performance with PhantomJS 2 - Fluent 2016
Wesley Hales
 
Learn Software Testing for ISTQB Foundation Exam
Learn Software Testing for ISTQB Foundation ExamLearn Software Testing for ISTQB Foundation Exam
Learn Software Testing for ISTQB Foundation Exam
Yogindernath Gupta
 
Сертификация ISTQB
Сертификация ISTQBСертификация ISTQB
Сертификация ISTQB
SQALab
 
Mobility testing overview and instructions
Mobility testing overview and instructionsMobility testing overview and instructions
Mobility testing overview and instructions
Alextyur
 
Istqb benefits
Istqb benefitsIstqb benefits
Istqb benefits
Alextyur
 
An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.
BugRaptors
 
Introduction to ISTQB & ISEB Certifications
Introduction to ISTQB & ISEB CertificationsIntroduction to ISTQB & ISEB Certifications
Introduction to ISTQB & ISEB Certifications
Yogindernath Gupta
 
ISTQB / ISEB Foundation Exam Practice - 6
ISTQB / ISEB Foundation Exam Practice - 6ISTQB / ISEB Foundation Exam Practice - 6
ISTQB / ISEB Foundation Exam Practice - 6
Yogindernath Gupta
 
ISTQB / ISEB Foundation Exam Practice - 5
ISTQB / ISEB Foundation Exam Practice - 5ISTQB / ISEB Foundation Exam Practice - 5
ISTQB / ISEB Foundation Exam Practice - 5
Yogindernath Gupta
 
ParisJS #10 : PhantomJs
ParisJS #10 : PhantomJs ParisJS #10 : PhantomJs
ParisJS #10 : PhantomJs
Maurice Svay
 
ISTQB / ISEB Foundation Exam Practice - 4
ISTQB / ISEB Foundation Exam Practice - 4ISTQB / ISEB Foundation Exam Practice - 4
ISTQB / ISEB Foundation Exam Practice - 4
Yogindernath Gupta
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriver
Anuraj S.L
 
昔むかし、あるところでPhantom jsに助けられた話
昔むかし、あるところでPhantom jsに助けられた話昔むかし、あるところでPhantom jsに助けられた話
昔むかし、あるところでPhantom jsに助けられた話
Yuki Kuramochi
 
Automated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumAutomated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and Selenium
Dev9Com
 
Когда стоит закончить автоматизировать?
Когда стоит закончить автоматизировать?Когда стоит закончить автоматизировать?
Когда стоит закончить автоматизировать?
SQALab
 
Ad

Similar to Introduction to PhantomJS (20)

Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Building Blocks
 
Protractor Testing Automation Tool Framework / Jasmine Reporters
Protractor Testing Automation Tool Framework / Jasmine ReportersProtractor Testing Automation Tool Framework / Jasmine Reporters
Protractor Testing Automation Tool Framework / Jasmine Reporters
Haitham Refaat
 
Panther loves Symfony apps
Panther loves Symfony appsPanther loves Symfony apps
Panther loves Symfony apps
Simone D'Amico
 
orcreatehappyusers
orcreatehappyusersorcreatehappyusers
orcreatehappyusers
tutorialsruby
 
orcreatehappyusers
orcreatehappyusersorcreatehappyusers
orcreatehappyusers
tutorialsruby
 
Playwright vs. Puppeteer : Choosing the Right Browser Automation Library.pdf
Playwright vs. Puppeteer : Choosing the Right Browser Automation Library.pdfPlaywright vs. Puppeteer : Choosing the Right Browser Automation Library.pdf
Playwright vs. Puppeteer : Choosing the Right Browser Automation Library.pdf
Steve Wortham
 
External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1) External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1)
Volkan Özçelik
 
Selenium drivers
Selenium driversSelenium drivers
Selenium drivers
DestinationQA
 
Getting Started with Playwright: A Beginner-Friendly Introduction & Setup Guide
Getting Started with Playwright: A Beginner-Friendly Introduction & Setup GuideGetting Started with Playwright: A Beginner-Friendly Introduction & Setup Guide
Getting Started with Playwright: A Beginner-Friendly Introduction & Setup Guide
Shubham Joshi
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
Volkan Özçelik
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesExternal JavaScript Widget Development Best Practices
External JavaScript Widget Development Best Practices
Volkan Özçelik
 
Blazor v1.1
Blazor v1.1Blazor v1.1
Blazor v1.1
Juan Luis Guerrero Minero
 
Selenium Automation
Selenium AutomationSelenium Automation
Selenium Automation
Anuradha Malalasena
 
Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022
NAVER D2
 
Cross browser web development
Cross browser web developmentCross browser web development
Cross browser web development
Ilya Starostin
 
Web development-work space
Web development-work spaceWeb development-work space
Web development-work space
chawlan
 
Zombiejs
ZombiejsZombiejs
Zombiejs
Виктор Ткаченко
 
Microsoft power point automation-opensourcetestingtools_matrix-1
Microsoft power point   automation-opensourcetestingtools_matrix-1Microsoft power point   automation-opensourcetestingtools_matrix-1
Microsoft power point automation-opensourcetestingtools_matrix-1
tactqa
 
Microsoft power point automation-opensourcetestingtools_matrix-1
Microsoft power point   automation-opensourcetestingtools_matrix-1Microsoft power point   automation-opensourcetestingtools_matrix-1
Microsoft power point automation-opensourcetestingtools_matrix-1
tactqa
 
Your Framework for Success: introduction to JavaScript Testing at Scale
Your Framework for Success: introduction to JavaScript Testing at ScaleYour Framework for Success: introduction to JavaScript Testing at Scale
Your Framework for Success: introduction to JavaScript Testing at Scale
Sauce Labs
 
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Building Blocks
 
Protractor Testing Automation Tool Framework / Jasmine Reporters
Protractor Testing Automation Tool Framework / Jasmine ReportersProtractor Testing Automation Tool Framework / Jasmine Reporters
Protractor Testing Automation Tool Framework / Jasmine Reporters
Haitham Refaat
 
Panther loves Symfony apps
Panther loves Symfony appsPanther loves Symfony apps
Panther loves Symfony apps
Simone D'Amico
 
Playwright vs. Puppeteer : Choosing the Right Browser Automation Library.pdf
Playwright vs. Puppeteer : Choosing the Right Browser Automation Library.pdfPlaywright vs. Puppeteer : Choosing the Right Browser Automation Library.pdf
Playwright vs. Puppeteer : Choosing the Right Browser Automation Library.pdf
Steve Wortham
 
External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1) External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1)
Volkan Özçelik
 
Getting Started with Playwright: A Beginner-Friendly Introduction & Setup Guide
Getting Started with Playwright: A Beginner-Friendly Introduction & Setup GuideGetting Started with Playwright: A Beginner-Friendly Introduction & Setup Guide
Getting Started with Playwright: A Beginner-Friendly Introduction & Setup Guide
Shubham Joshi
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
Volkan Özçelik
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesExternal JavaScript Widget Development Best Practices
External JavaScript Widget Development Best Practices
Volkan Özçelik
 
Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022
NAVER D2
 
Cross browser web development
Cross browser web developmentCross browser web development
Cross browser web development
Ilya Starostin
 
Web development-work space
Web development-work spaceWeb development-work space
Web development-work space
chawlan
 
Microsoft power point automation-opensourcetestingtools_matrix-1
Microsoft power point   automation-opensourcetestingtools_matrix-1Microsoft power point   automation-opensourcetestingtools_matrix-1
Microsoft power point automation-opensourcetestingtools_matrix-1
tactqa
 
Microsoft power point automation-opensourcetestingtools_matrix-1
Microsoft power point   automation-opensourcetestingtools_matrix-1Microsoft power point   automation-opensourcetestingtools_matrix-1
Microsoft power point automation-opensourcetestingtools_matrix-1
tactqa
 
Your Framework for Success: introduction to JavaScript Testing at Scale
Your Framework for Success: introduction to JavaScript Testing at ScaleYour Framework for Success: introduction to JavaScript Testing at Scale
Your Framework for Success: introduction to JavaScript Testing at Scale
Sauce Labs
 
Ad

Recently uploaded (20)

Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 

Introduction to PhantomJS

  • 2. What is ● ● ● PhantomJS is a headless WebKit scriptable with a JavaScript API. Created by Ariya Hidayat. (http://ariya.ofilabs.com) PhantomJS itself is NOT a test framework, it is only used to launch the tests via suitable test runner.
  • 3. What Exactly Headless WebKit ● ● WebKit is the layout engine that designed to allow web browsers to render web pages. Chrome, Safari and a couple of other browsers also use WebKit. Actually, PhantomJS is a browser but a headless browser. This means that the rendered web pages are never displayed.
  • 4. Use Cases ● ● ● ● Headless web testing. Lightning-fast testing without the browser. Various test frameworks such as Jasmine, Capybara, QUnit, Mocha, WebDriver, YUI Test, BusterJS, FuncUnit, Robot Framework, and many others are supported. Page automation. Access and manipulate web pages with the standard DOM API, or with usual libraries like jQuery. Screen capture. Programmatically capture web contents, including CSs, SVG and Canvas. Build server-side web graphics apps, from a screenshot service to a vector chart rasterizer. Network monitoring. Automate performance analysis, track page loading and export as standard HAR format.
  • 5. Features ● ● ● ● Multiplatform, available on major operating systems: Windows, Mac OS X, Linux, other Unices. Fast and native implementation of web standards: DOM, CSS, JavaScript, Canvas, SVG. No emulation! Pure headless (no X11) on Linux, ideal for continuous integration systems. Also runs on Amazon EC2, Heroku, Iron.io. Easy to install.
  • 6. Ecosystem PhantomJS needs not be used only as a stand-alone tool. Check also some excellent related projects: ● ● ● ● ● ● CasperJS enables easy navigation scripting and common highlevel testing. Poltergeist allows running Capybara tests headlessly. Guard::Jasmine automatically tests Jasmine specs on Rails when files are modified. GhostDriver complements Selenium tests with a PhantomJS WebDriver implementation. PhantomRobot runs Robot Framework acceptance tests in the background via PhantomJS. Mocha-PhantomJS run Mocha tests using PhantomJS.
  • 7. How to Download and Set Up ● Go http://phantomjs.org/download.html ● Download phantomjs-x.x.x-windows.zip ● Unzip the folder ● Set the path: 1.From the Desktop, right click Computer and click Properties. 2. Click Advanced System Settings 3.Click Environment Variables... button 4.Select Path in System variables and click Edit button 5.Copy and Paste the location of phantomjs folder. Ex; in my case: “C:UserserolToolsphantomjs-1.9.2-windows” 6. Click OK buttons.
  • 8. How to Run ● Create a text file that contains the following lines: console.log('Radiohead is Awesome, by the way Hi World!'); phantom.exit(); ● Save it as hi.js ● Run it from command prompt like this; phantomjs hi.js ● The output is: Radiohead is Awesome, by the way Hi World!
  • 9. Examples ● It captures screenshot with given width and height also get the page title.
  • 10. Examples This script shows the number of twitter followers for a specific account.
  • 11. Thanks For more information visit: ● https://github.com/ariya/phantomjs/wiki