SlideShare a Scribd company logo
1 of 11
Download to read offline
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

More Related Content

What's hot

General Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScriptGeneral Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScriptSpike 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 NashornMaxime Najim
 
WebAssembly Fundamentals
WebAssembly FundamentalsWebAssembly Fundamentals
WebAssembly FundamentalsKnoldus Inc.
 
Kickstarter Your Node.JS Application
Kickstarter Your Node.JS ApplicationKickstarter Your Node.JS Application
Kickstarter Your Node.JS ApplicationHengki Sihombing
 
Cpsc 473 01 lightning talk
Cpsc 473 01 lightning talkCpsc 473 01 lightning talk
Cpsc 473 01 lightning talkKetul Shah
 
Selenium webdriver
Selenium webdriverSelenium webdriver
Selenium webdriversean_todd
 
Lazy angular w/ webpack
Lazy angular w/ webpackLazy angular w/ webpack
Lazy angular w/ webpackRich Snapp
 
Web development using nodejs
Web development using nodejsWeb development using nodejs
Web development using nodejsVaisakh Babu
 
Testing Mobile JavaScript
Testing Mobile JavaScriptTesting Mobile JavaScript
Testing Mobile JavaScriptjeresig
 
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 & CeleryRidwan Fadjar
 
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015Eirik Vullum
 
Browser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.jsBrowser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.jsLuís Bastião Silva
 
Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack IntroductionAnjali 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 ProtractorKasun 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 2016kraeger
 
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.NetRuwantha Ratnayake
 

What's hot (20)

General Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScriptGeneral Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScript
 
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...
 
Isomorphic JavaScript with Nashorn
Isomorphic JavaScript with NashornIsomorphic JavaScript with Nashorn
Isomorphic JavaScript with Nashorn
 
WebAssembly Fundamentals
WebAssembly FundamentalsWebAssembly Fundamentals
WebAssembly Fundamentals
 
Kickstarter Your Node.JS Application
Kickstarter Your Node.JS ApplicationKickstarter Your Node.JS Application
Kickstarter Your Node.JS Application
 
Cpsc 473 01 lightning talk
Cpsc 473 01 lightning talkCpsc 473 01 lightning talk
Cpsc 473 01 lightning talk
 
Selenium webdriver
Selenium webdriverSelenium webdriver
Selenium webdriver
 
Web driver training
Web driver trainingWeb driver training
Web driver training
 
Lazy angular w/ webpack
Lazy angular w/ webpackLazy angular w/ webpack
Lazy angular w/ webpack
 
VorlonJS
VorlonJSVorlonJS
VorlonJS
 
Web development using nodejs
Web development using nodejsWeb development using nodejs
Web development using nodejs
 
Testing Mobile JavaScript
Testing Mobile JavaScriptTesting Mobile JavaScript
Testing Mobile JavaScript
 
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
 
Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015Building Isomorphic JavaScript Apps - NDC 2015
Building Isomorphic JavaScript Apps - NDC 2015
 
Browser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.jsBrowser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.js
 
Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack Introduction
 
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
 
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
 
Sails.js Intro
Sails.js IntroSails.js Intro
Sails.js Intro
 
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
 

Viewers also liked

ISTQB Foundation Level Basic
ISTQB Foundation Level BasicISTQB Foundation Level Basic
ISTQB Foundation Level BasicErol 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 startji 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 2016Wesley 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 ExamYogindernath Gupta
 
Сертификация ISTQB
Сертификация ISTQBСертификация ISTQB
Сертификация ISTQBSQALab
 
Mobility testing overview and instructions
Mobility testing overview and instructionsMobility testing overview and instructions
Mobility testing overview and instructionsAlextyur
 
Istqb benefits
Istqb benefitsIstqb benefits
Istqb benefitsAlextyur
 
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 CertificationsYogindernath Gupta
 
ISTQB / ISEB Foundation Exam Practice - 6
ISTQB / ISEB Foundation Exam Practice - 6ISTQB / ISEB Foundation Exam Practice - 6
ISTQB / ISEB Foundation Exam Practice - 6Yogindernath Gupta
 
ISTQB / ISEB Foundation Exam Practice - 5
ISTQB / ISEB Foundation Exam Practice - 5ISTQB / ISEB Foundation Exam Practice - 5
ISTQB / ISEB Foundation Exam Practice - 5Yogindernath 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 - 4Yogindernath Gupta
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriverAnuraj 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 SeleniumDev9Com
 

Viewers also liked (20)

ISTQB Foundation Level Basic
ISTQB Foundation Level BasicISTQB Foundation Level Basic
ISTQB Foundation Level Basic
 
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ü
 
Phantom js quick start
Phantom js quick startPhantom js quick start
Phantom js quick start
 
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
 
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
 
Сертификация ISTQB
Сертификация ISTQBСертификация ISTQB
Сертификация ISTQB
 
Mobility testing overview and instructions
Mobility testing overview and instructionsMobility testing overview and instructions
Mobility testing overview and instructions
 
Istqb benefits
Istqb benefitsIstqb benefits
Istqb benefits
 
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.
 
Introduction to ISTQB & ISEB Certifications
Introduction to ISTQB & ISEB CertificationsIntroduction to ISTQB & ISEB Certifications
Introduction to ISTQB & ISEB Certifications
 
ISTQB / ISEB Foundation Exam Practice - 6
ISTQB / ISEB Foundation Exam Practice - 6ISTQB / ISEB Foundation Exam Practice - 6
ISTQB / ISEB Foundation Exam Practice - 6
 
ISTQB / ISEB Foundation Exam Practice - 5
ISTQB / ISEB Foundation Exam Practice - 5ISTQB / ISEB Foundation Exam Practice - 5
ISTQB / ISEB Foundation Exam Practice - 5
 
ParisJS #10 : PhantomJs
ParisJS #10 : PhantomJs ParisJS #10 : PhantomJs
ParisJS #10 : PhantomJs
 
Agile for Non-IT
Agile for Non-ITAgile for Non-IT
Agile for Non-IT
 
ISTQB / ISEB Foundation Exam Practice - 4
ISTQB / ISEB Foundation Exam Practice - 4ISTQB / ISEB Foundation Exam Practice - 4
ISTQB / ISEB Foundation Exam Practice - 4
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriver
 
昔むかし、あるところでPhantom jsに助けられた話
昔むかし、あるところでPhantom jsに助けられた話昔むかし、あるところでPhantom jsに助けられた話
昔むかし、あるところでPhantom jsに助けられた話
 
ISTQB REX BLACK book
ISTQB REX BLACK bookISTQB REX BLACK book
ISTQB REX BLACK book
 
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
 
Istqb foundation level day 1
Istqb foundation level   day 1Istqb foundation level   day 1
Istqb foundation level day 1
 

Similar to Introduction to PhantomJS

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 ReportersHaitham Refaat
 
Panther loves Symfony apps
Panther loves Symfony appsPanther loves Symfony apps
Panther loves Symfony appsSimone D'Amico
 
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
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Volkan Özçelik
 
UI Automation Testing using Playwright with.docx
UI Automation Testing using Playwright with.docxUI Automation Testing using Playwright with.docx
UI Automation Testing using Playwright with.docxAfour tech
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesExternal JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesVolkan Ö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_20131022NAVER D2
 
Cross browser web development
Cross browser web developmentCross browser web development
Cross browser web developmentIlya Starostin
 
Web development-work space
Web development-work spaceWeb development-work space
Web development-work spacechawlan
 
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-1tactqa
 
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-1tactqa
 
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 ScaleSauce Labs
 
Cross Browser Automation Testing Using Watir
Cross Browser Automation Testing Using WatirCross Browser Automation Testing Using Watir
Cross Browser Automation Testing Using WatirSarah Elson
 

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...
 
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
 
Panther loves Symfony apps
Panther loves Symfony appsPanther loves Symfony apps
Panther loves Symfony apps
 
orcreatehappyusers
orcreatehappyusersorcreatehappyusers
orcreatehappyusers
 
orcreatehappyusers
orcreatehappyusersorcreatehappyusers
orcreatehappyusers
 
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)
 
Selenium drivers
Selenium driversSelenium drivers
Selenium drivers
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
 
UI Automation Testing using Playwright with.docx
UI Automation Testing using Playwright with.docxUI Automation Testing using Playwright with.docx
UI Automation Testing using Playwright with.docx
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesExternal JavaScript Widget Development Best Practices
External JavaScript Widget Development Best Practices
 
Blazor v1.1
Blazor v1.1Blazor v1.1
Blazor v1.1
 
Selenium Automation
Selenium AutomationSelenium Automation
Selenium Automation
 
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
 
Cross browser web development
Cross browser web developmentCross browser web development
Cross browser web development
 
Web development-work space
Web development-work spaceWeb development-work space
Web development-work space
 
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
 
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
 
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
 
Cross Browser Automation Testing Using Watir
Cross Browser Automation Testing Using WatirCross Browser Automation Testing Using Watir
Cross Browser Automation Testing Using Watir
 

Recently uploaded

Metabolism , Metabolic Fate& disorders of cholesterol.pptx
Metabolism , Metabolic Fate& disorders of cholesterol.pptxMetabolism , Metabolic Fate& disorders of cholesterol.pptx
Metabolism , Metabolic Fate& disorders of cholesterol.pptxDr. Santhosh Kumar. N
 
BBA 205 BUSINESS ENVIRONMENT UNIT I.pptx
BBA 205 BUSINESS ENVIRONMENT UNIT I.pptxBBA 205 BUSINESS ENVIRONMENT UNIT I.pptx
BBA 205 BUSINESS ENVIRONMENT UNIT I.pptxProf. Kanchan Kumari
 
Material Remains as Source of Ancient Indian History & Culture.ppt
Material Remains as Source of Ancient Indian History & Culture.pptMaterial Remains as Source of Ancient Indian History & Culture.ppt
Material Remains as Source of Ancient Indian History & Culture.pptBanaras Hindu University
 
THYROID HORMONE.pptx by Subham Panja,Asst. Professor, Department of B.Sc MLT,...
THYROID HORMONE.pptx by Subham Panja,Asst. Professor, Department of B.Sc MLT,...THYROID HORMONE.pptx by Subham Panja,Asst. Professor, Department of B.Sc MLT,...
THYROID HORMONE.pptx by Subham Panja,Asst. Professor, Department of B.Sc MLT,...Subham Panja
 
Metabolism of lipoproteins & its disorders(Chylomicron & VLDL & LDL).pptx
Metabolism of  lipoproteins & its disorders(Chylomicron & VLDL & LDL).pptxMetabolism of  lipoproteins & its disorders(Chylomicron & VLDL & LDL).pptx
Metabolism of lipoproteins & its disorders(Chylomicron & VLDL & LDL).pptxDr. Santhosh Kumar. N
 
UNIT I Design Thinking and Explore.pptx
UNIT I  Design Thinking and Explore.pptxUNIT I  Design Thinking and Explore.pptx
UNIT I Design Thinking and Explore.pptxGOWSIKRAJA PALANISAMY
 
Arti Languages Pre Seed Send Ahead Pitchdeck 2024.pdf
Arti Languages Pre Seed Send Ahead Pitchdeck 2024.pdfArti Languages Pre Seed Send Ahead Pitchdeck 2024.pdf
Arti Languages Pre Seed Send Ahead Pitchdeck 2024.pdfwill854175
 
Riti theory by Vamana Indian poetics.pptx
Riti theory by Vamana Indian poetics.pptxRiti theory by Vamana Indian poetics.pptx
Riti theory by Vamana Indian poetics.pptxDhatriParmar
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...Nguyen Thanh Tu Collection
 
Quantitative research methodology and survey design
Quantitative research methodology and survey designQuantitative research methodology and survey design
Quantitative research methodology and survey designBalelaBoru
 
The First National K12 TUG March 6 2024.pdf
The First National K12 TUG March 6 2024.pdfThe First National K12 TUG March 6 2024.pdf
The First National K12 TUG March 6 2024.pdfdogden2
 
3.14.24 The Selma March and the Voting Rights Act.pptx
3.14.24 The Selma March and the Voting Rights Act.pptx3.14.24 The Selma March and the Voting Rights Act.pptx
3.14.24 The Selma March and the Voting Rights Act.pptxmary850239
 
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...Nguyen Thanh Tu Collection
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - HK2 (...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - HK2 (...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - HK2 (...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - HK2 (...Nguyen Thanh Tu Collection
 
Certification Study Group - Professional ML Engineer Session 3 (Machine Learn...
Certification Study Group - Professional ML Engineer Session 3 (Machine Learn...Certification Study Group - Professional ML Engineer Session 3 (Machine Learn...
Certification Study Group - Professional ML Engineer Session 3 (Machine Learn...gdgsurrey
 
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...Marlene Maheu
 
EDD8524 The Future of Educational Leader
EDD8524 The Future of Educational LeaderEDD8524 The Future of Educational Leader
EDD8524 The Future of Educational LeaderDr. Bruce A. Johnson
 
Pharmacology chapter No 7 full notes.pdf
Pharmacology chapter No 7 full notes.pdfPharmacology chapter No 7 full notes.pdf
Pharmacology chapter No 7 full notes.pdfSumit Tiwari
 
3.12.24 The Social Construction of Gender.pptx
3.12.24 The Social Construction of Gender.pptx3.12.24 The Social Construction of Gender.pptx
3.12.24 The Social Construction of Gender.pptxmary850239
 

Recently uploaded (20)

Metabolism , Metabolic Fate& disorders of cholesterol.pptx
Metabolism , Metabolic Fate& disorders of cholesterol.pptxMetabolism , Metabolic Fate& disorders of cholesterol.pptx
Metabolism , Metabolic Fate& disorders of cholesterol.pptx
 
BBA 205 BUSINESS ENVIRONMENT UNIT I.pptx
BBA 205 BUSINESS ENVIRONMENT UNIT I.pptxBBA 205 BUSINESS ENVIRONMENT UNIT I.pptx
BBA 205 BUSINESS ENVIRONMENT UNIT I.pptx
 
Material Remains as Source of Ancient Indian History & Culture.ppt
Material Remains as Source of Ancient Indian History & Culture.pptMaterial Remains as Source of Ancient Indian History & Culture.ppt
Material Remains as Source of Ancient Indian History & Culture.ppt
 
THYROID HORMONE.pptx by Subham Panja,Asst. Professor, Department of B.Sc MLT,...
THYROID HORMONE.pptx by Subham Panja,Asst. Professor, Department of B.Sc MLT,...THYROID HORMONE.pptx by Subham Panja,Asst. Professor, Department of B.Sc MLT,...
THYROID HORMONE.pptx by Subham Panja,Asst. Professor, Department of B.Sc MLT,...
 
Metabolism of lipoproteins & its disorders(Chylomicron & VLDL & LDL).pptx
Metabolism of  lipoproteins & its disorders(Chylomicron & VLDL & LDL).pptxMetabolism of  lipoproteins & its disorders(Chylomicron & VLDL & LDL).pptx
Metabolism of lipoproteins & its disorders(Chylomicron & VLDL & LDL).pptx
 
UNIT I Design Thinking and Explore.pptx
UNIT I  Design Thinking and Explore.pptxUNIT I  Design Thinking and Explore.pptx
UNIT I Design Thinking and Explore.pptx
 
Arti Languages Pre Seed Send Ahead Pitchdeck 2024.pdf
Arti Languages Pre Seed Send Ahead Pitchdeck 2024.pdfArti Languages Pre Seed Send Ahead Pitchdeck 2024.pdf
Arti Languages Pre Seed Send Ahead Pitchdeck 2024.pdf
 
Riti theory by Vamana Indian poetics.pptx
Riti theory by Vamana Indian poetics.pptxRiti theory by Vamana Indian poetics.pptx
Riti theory by Vamana Indian poetics.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
 
Quantitative research methodology and survey design
Quantitative research methodology and survey designQuantitative research methodology and survey design
Quantitative research methodology and survey design
 
The First National K12 TUG March 6 2024.pdf
The First National K12 TUG March 6 2024.pdfThe First National K12 TUG March 6 2024.pdf
The First National K12 TUG March 6 2024.pdf
 
3.14.24 The Selma March and the Voting Rights Act.pptx
3.14.24 The Selma March and the Voting Rights Act.pptx3.14.24 The Selma March and the Voting Rights Act.pptx
3.14.24 The Selma March and the Voting Rights Act.pptx
 
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...
25 CHUYÊN ĐỀ ÔN THI TỐT NGHIỆP THPT 2023 – BÀI TẬP PHÁT TRIỂN TỪ ĐỀ MINH HỌA...
 
ANOVA Parametric test: Biostatics and Research Methodology
ANOVA Parametric test: Biostatics and Research MethodologyANOVA Parametric test: Biostatics and Research Methodology
ANOVA Parametric test: Biostatics and Research Methodology
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - HK2 (...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - HK2 (...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - HK2 (...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - HK2 (...
 
Certification Study Group - Professional ML Engineer Session 3 (Machine Learn...
Certification Study Group - Professional ML Engineer Session 3 (Machine Learn...Certification Study Group - Professional ML Engineer Session 3 (Machine Learn...
Certification Study Group - Professional ML Engineer Session 3 (Machine Learn...
 
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...
2024 March 11, Telehealth Billing- Current Telehealth CPT Codes & Telehealth ...
 
EDD8524 The Future of Educational Leader
EDD8524 The Future of Educational LeaderEDD8524 The Future of Educational Leader
EDD8524 The Future of Educational Leader
 
Pharmacology chapter No 7 full notes.pdf
Pharmacology chapter No 7 full notes.pdfPharmacology chapter No 7 full notes.pdf
Pharmacology chapter No 7 full notes.pdf
 
3.12.24 The Social Construction of Gender.pptx
3.12.24 The Social Construction of Gender.pptx3.12.24 The Social Construction of Gender.pptx
3.12.24 The Social Construction of Gender.pptx
 

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