Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Getting Started with PhantomJS
Getting Started with PhantomJS

Getting Started with PhantomJS: Harness the strength and capabilities of PhantomJS to interact with the web and perform website testing with a headless browser based on WebKit

eBook
$13.98 $19.99
Paperback
$32.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Getting Started with PhantomJS

Chapter 2. Manipulating Page Content

PhantomJS is a browser, and the basic function of a browser is to access web pages. In this chapter, we will learn various techniques of loading web pages in PhantomJS, and we will explore beyond using it simply as a headless browser.

Opening a web page

In a normal browser, opening a web page means typing a URL and letting the browser render the document fetched. It works almost the same way in PhantomJS, except that we don't actually wait for the page to be rendered before our eyes. Everything is done in a non-visual way. We don't see text, high-resolution images, or even animation on the page. We don't see anything that will show up on the screen.

We also do not type the URL in the address bar as we do in a normal browser. We create scripts to load the page. We learned in the previous chapter that to access a URL or a page in PhantomJS, we need to use the WebPage API.

var page = require('webpage').create();
page.open("http://www.packtpub.com", function(status) {
  if ( status === "success" ) {
    console.log("Page is loaded.");
    phantom.exit(0);
  }
});

And that's how we open a page in PhantomJS. So what now? We don't use PhantomJS just to browse a...

Playing with DOM elements

There are a lot of things we can do with the page we are accessing beyond getting the title of the document, and this can be done with a little help from the Document Object Model API. We are not going to discuss each object and function of the DOM API, but we will touch on some that are very useful. If you want to learn more about DOM API, the best place to start is the Mozilla Development Network: https://developer.mozilla.org/en-US/docs/DOM.

Selecting elements

Everything starts with the document object, and it contains nested elements. To select an element, we either traverse the entire document or use the DOM selectors. There are different methods to reference a document element, which can be done by element ID, class, name, tag, or XPath.

getElementById

This retrieves the element using a unique ID

getElementByClassName

This selects the element using the element class name

getElementByName

This provides a reference using the element name

getElementByTagName...

Simulating mouse clicks

Web pages are built with interlocking links, and getting to another page can be done by following that link. In a normal browser, this is done by clicking with your mouse button. In PhantomJS there are two ways to do this: one is by using PhantomJS sendEvent functions (PhantomJS event triggering); the other is by using DOM event triggering.

PhantomJS event triggering

The WebPage API supports sending events to the page. This can be mouse events or keyboard events. We will discuss more events as we progress, but for now we will tackle how to simulate clicking on page elements and links using PhantomJS event triggering.

PhantomJS Mouse Event Triggering API

sendEvent( eventType, Point X, Point Y, button='left' )

eventType

  • mouseup
  • mousedown
  • mousemove
  • click
  • doubleclick

Point X

This is the X coordinate where we trigger the event

Point Y

This is the Y coordinate where we trigger the event

button

This states which mouse button to trigger; by default...

Working with form fields

If we are dealing with web pages, more often than not, we will come across form fields, which are input boxes, selection lists, text areas, and buttons. PhantomJS can also be used to automate the input of data and changing field values.

One of the best examples of these scenarios is a login page. We will create a script that will automate the login process to Instagram's web profile. Again, the username and password will be passed as command-line arguments. The first argument is username, followed by password.

var system = require('system');
var username = system.args[1];
var password = system.args[2];

Now that we have our credentials, we then open Instagram's login page at https://www.instagram.com/accounts/login.

var page = require('webpage').create();
page.open('https://instagram.com/accounts/login/',
function(status) {

With simple browser page inspection, we can check the element ID of the username field, password field, and...

Summary

PhantomJS's capability of manipulating web pages is very flexible. We can do a lot more than just accessing the page itself. We can modify the look, change content on the fly, or even dynamically interact with its behavior as it was coded. In this chapter, we have tried to capture relevant data from an existing social media site and use it for any other purpose. This is just the beginning of what PhantomJS can do as far as interacting with web pages. We also touched a bit upon handling the status of pages and did a simple pausing. Using JavaScript's setTimeout is just a simple workaround to let the background process complete. Proper handling of page events is also supported in PhantomJS, and we will be discussing them in the next chapter.

Left arrow icon Right arrow icon

Key benefits

  • Writing scripts that can interact directly with web services and pages
  • Interacting with social media websites using PhantomJS scripts
  • Creating web-based test scripts and running them in a headless browser

Description

PhantomJS is a headless WebKit browser with JavaScript API that allows you to create new ways to automate web testing. PhantomJS is currently being used by a large number of users to help them integrate headless web testing into their development processes. It also gives you developers a new framework to create web-based applications, from simple web manipulation to performance measurement and monitoring.A step step-by by-step guide that will help you develop new tools for solving web and testing problems in an effective and quick way. The book will teach you how to use and maximize PhantomJS to develop new tools for web scrapping, web performance measurement and monitoring, and headless web testing. This book will help you understand PhantomJS’ scripting API capabilities and strengths.This book starts by looking at PhantomJS’ JavaScript API, features, and basic execution of scripts. Throughout the book, you will learn details to help you write scripts to manipulate web documents and fully create a web scrapping tool.Through its practical approach, this book strives to teach you by example, where each chapter focuses on the common and practical usage of PhantomJS, and how to extract meaningful information from the web and other services.By the end of the book, you will have acquired the skills to enable you to use PhantomJS for web testing, as well as learning the basics of Jasmine, and how it can be used with PhantomJS.

Who is this book for?

If you are a JavaScript developers who is interested in developing applications that interact with various web services, using a headless browser, then this book is ideal for you. This book will also be good for you if you are planning to create a headless browser testing for your web application. Basic understanding of JavaScript is assumed.

What you will learn

  • Explore the possibilities of PhantomJS development and make use of a headless browser
  • Understand PhantomJS’ core features and API
  • Manipulate the DOM properties of web pages using scripts
  • Interact with web pages using PhantomJS scripts
  • Learn how to emulate keyboards and mouse actions
  • Work with geolocation services with PhantomJS
  • Build scripts that will create web sites snapshots
  • Create and implement PhantomJS custom modules
  • Use PhantomJS to perform headless testing with Jasmine
Estimated delivery fee Deliver to Chile

Standard delivery 10 - 13 business days

$19.95

Premium delivery 3 - 6 business days

$40.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 25, 2013
Length: 140 pages
Edition : 1st
Language : English
ISBN-13 : 9781782164227
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Estimated delivery fee Deliver to Chile

Standard delivery 10 - 13 business days

$19.95

Premium delivery 3 - 6 business days

$40.95
(Includes tracking information)

Product Details

Publication date : Nov 25, 2013
Length: 140 pages
Edition : 1st
Language : English
ISBN-13 : 9781782164227
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 127.97
Getting Started with PhantomJS
$32.99
PhantomJS Cookbook
$45.99
Data Visualization with D3.js Cookbook
$48.99
Total $ 127.97 Stars icon

Table of Contents

12 Chapters
1. Getting Started Chevron down icon Chevron up icon
2. Manipulating Page Content Chevron down icon Chevron up icon
3. Handling Events and Callbacks Chevron down icon Chevron up icon
4. Capturing Errors Chevron down icon Chevron up icon
5. Grabbing Pages Chevron down icon Chevron up icon
6. Accessing Location-based Services Chevron down icon Chevron up icon
7. Working with Files Chevron down icon Chevron up icon
8. Cookies Chevron down icon Chevron up icon
9. External JavaScript Chevron down icon Chevron up icon
10. Testing with PhantomJS Chevron down icon Chevron up icon
11. Maximizing PhantomJS Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.8
(5 Ratings)
5 star 80%
4 star 20%
3 star 0%
2 star 0%
1 star 0%
SetITGood Feb 09, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Being in IT for almost two decades now I am perhaps lucky to have witnessed the growth of this industry. More so, I am glad to see the "rebirth" of Java Scripting for front-end development in the recent years. But ask any front-end developer and one thing they dreaded most was testing these web pages and Java Scripts. PhantomJS - however is a game changer!PhantomJS provides "headless" testing of web applications. Wait, what did I mean with headless? When you are typing a URL from the browser, it essentially creates a request and the response is reflected on the page. PhantomJS actually does the same thing, EXCEPT we don't need to wait for it to be rendered before our eyes! Probably this is how it got its name :)PhantomJS also can dynamically capture/render pages as images, allow manipulation of page content/event, gain access to network-level information, and ability to save important infos into files for later processing.I find this book easy to read with only 121 pages, you can actually finish it in one sitting (but would be good to do it in front of your laptop trying out the sample codes yourself). However, it is advised you already have concrete knowledge of Java Scripts, HMTL, and CSS since the book heavily used later technologies such as DOM, JSON, and HTML5.An improvement I guess would be since the goal of the book was to jumpstart IT practitioners into PhantomJS, it would have been better to have laid out the different syntaxes of PhantomJS itself. In Chapter 2, I was surprised to see "===" as the conditional operator. Having used to "==" in Java, I had to check this if it was a typo.The book has more to give than what I expected. All throughout, the book used actual web pages (e.g. Pinterest, Instagram) as examples for us to run our tests, which challenges our creativity and encourages us to further try it out with other pages. Aside from PhantomJS, I liked how in a subtle way, the author introduced other technologies such as Yahoo LocalSearch and Google Directions API (which made me realized how easy it was to use them!). In the last chapter, the book introduced CasperJS - a spin-off extension and further simplified PhantomJS. I find this really exciting!The book is concise and straightforward, I highly encourage everyone doing front-end development to read this and for Technical Architects to consider PhantomJS at production work.On a side note, I noticed that the author used his family member's names all throughout the book, so I guess this was in some way a personal book. Anyway, I am excited for PhantomJS and is looking forward to further playing with it!
Amazon Verified review Amazon
Bill Mar 30, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great book. I had so much pleasure reading it and harness the power of phantomjs. Having a limited time for a project, i couldnt find much info about it even on their main site. This book provided an easy to follow guide. I recommend it!
Amazon Verified review Amazon
Geomar Esmilla Feb 10, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Getting Started with PhantomJS is a book about well, getting started. My work for the past 5 years requires me to review application architecture and data protection solutions, needless to say I have not coded in years. And this book just got me started writing codes again. You see, it really gets you started.There are very few books on web development tools these days that could capture my interest and maintain my interest. This book? I like this book. I like the way it's written. You should buy a copy and read it. Why? Because it starts and ends the way I like it. From introducing you to the command line interface (really for geek in all of us who loves that legacy look) and it ends with a shortlist of cool tools that will keep your momentum going.Aries Beltran writes that way that makes me reminisce those moments reading Borland books back in the 80s and 90s. Ahh.. Nostalgia. Simple, and effective in catching the reader's interest as one flips from page to page. This is a 140-page book. It's not long like those 5 inches thick book. But I'm impatient. I thought I'm going to speed read my way through it because I just don't have the patience, but I was wrong. It got me engaged enough to read, really read it from cover to cover. Every 11 chapter provides a newbie to PhantomJS like me a "Eureka" moment. I found myself immerse in Aries Beltran's world. I coded while reading. I coded while I ate (I especially loved Chapter 8: Cookies). And I coded in my sleep. And discovered that I like PhantomJS.The book is packed with cool recommendations:* Check out Confess.JS for metrics (a topic close to my heart)* CasperJS seems like a natural progression from PhantomJSThis book is basically good stuff. It's a book you will revisit again and again. It's a good addition to any developer's and web aficionado's library.Check them out. [...]
Amazon Verified review Amazon
Robert Y. De Cruz Feb 10, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
PhantomJS makes website UI testing easy. It can be used as an automation tool for repeatedly going through each page, providing a means for testing that a code commit didn't break the website. Full-time testers can use it to automate their work by setting up the test scripts once, then letting PhantomJS do the tedious work of re-running the script every time the same functionality needs to be tested. This is the way UI testing should be done and I wish we had a similar tool/framework for non-Webkit browsers and desktop apps.This book is an excellent tutorial to PhantomJS. After going through the book, I'm able to do simple tasks such as opening web pages, triggering UI elements, etc. Then it shows me how to do the more complex stuff such as taking a screenshot of a web page when it was accessed, reading cookies, and doing unit testing. Software Testers will find this book valuable to their job as it goes through all the functionality you'll need to test most websites. This book will also be useful for Software Devs aiming to add some UI-level unit testing to make sure markup and JS changes don't break any of the existing UI functionality. This is a must-have book for any web development project.I also found the book to be a good reference manual as it's designed to be easy to look up how to do things. The example scripts are simple to follow and can be readily incorporated in your test scripts. It's a valuable tool in the tester's arsenal. Highly recommended for website testers and web developers looking for an easier way to test and automate their web scripts.[...]
Amazon Verified review Amazon
Andrew Artajos Feb 08, 2014
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
At 140 pages and 11 chapters, this book is a quick read. To be honest it looks more like a booklet than a real book. Despite its appearance, it delivers the meat on the chosen subject--Getting started with PhantomJS.It starts you off on basic tasks like installing PhantomJS, working with the commandline, then moves toward the more complex tasks. The author shows you how to download a simple webpage then slowly builds upon this foundation in the succeeding chapters, until you get to learn how to use PhantomJS with different API's, JQuery, Jasmine--a unittesting framework, and CasperJS. There were some parts of the book I rather skip like Capturing Errors, Working with Files, and Cookies. These topics are boring but necessary nonetheless.The book is clear, concise, and uses simple English. This helps the reader go through the book quickly without having to put more effort in understanding the subject.The book in paperback format, although more expensive, is easier to read than the ebook format. When working with the examples, I think it would be more practical to buy the ebook instead. It will be easier to refer to when typing the actual code on the computer.However, this book makes you want more. I want to see in the future a more in depth take on PhantomJS. Most likely a book that discusses the best practices and some programming gems on the topic.Overall, this book is quite informative. It gets your feet wet on PhantomJS. I'm surprised that PhantomJS could open up to a lot of possible avenues to explore. PhantomJS when combined with modules, API's, and other open source software, offers a rich set of building tools for creating the next kick ass browser based solution.as seen on [...]
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela