Monthly Archives: November 2014

Protractor: Angular testing made easy

By Hank Duan, Julie Ralph, and Arif Sukoco in Seattle

Have you worked with WebDriver but been frustrated with all the waits needed for WebDriver to sync with the website, causing flakes and prolonged test times? If you are working with AngularJS apps, then Protractor is the right tool for you.

Protractor ( is an end-to-end test framework specifically for AngularJS apps. It was built by a team in Google and released to open source. Protractor is built on top of WebDriverJS and includes important improvements tailored for AngularJS apps. Here are some of Protractor’s key benefits:

  • You don’t need to add waits or sleeps to your test. Protractor can communicate with your AngularJS app automatically and execute the next step in your test the moment the webpage finishes pending tasks, so you don’t have to worry about waiting for your test and webpage to sync. 
  • It supports Angular-specific locator strategies (e.g., binding, model, repeater) as well as native WebDriver locator strategies (e.g., ID, CSS selector, XPath). This allows you to test Angular-specific elements without any setup effort on your part. 
  • It is easy to set up page objects. Protractor does not execute WebDriver commands until an action is needed (e.g., get, sendKeys, click). This way you can set up page objects so tests can manipulate page elements without touching the HTML. 
  • It uses Jasmine, the framework you use to write AngularJS unit tests, and Javascript, the same language you use to write AngularJS apps.

Follow these simple steps, and in minutes, you will have you first Protractor test running:

1) Set up environment

Install the command line tools ‘protractor’ and ‘webdriver-manager’ using npm:
npm install -g protractor

Start up an instance of a selenium server:
webdriver-manager update & webdriver-manager start

This downloads the necessary binary, and starts a new webdriver session listening on http://localhost:4444.

2) Write your test
// It is a good idea to use page objects to modularize your testing logic
var angularHomepage = {
nameInput : element(by.model('yourName')),
greeting : element(by.binding('yourName')),
get : function() {
setName : function(name) {

// Here we are using the Jasmine test framework
// See for more details
describe('angularjs homepage', function() {
it('should greet the named user', function(){
toEqual('Hello Julie!');

3) Write a Protractor configuration file to specify the environment under which you want your test to run:
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',

specs: ['testFolder/*'],

multiCapabilities: [{
'browserName': 'chrome',
// browser-specific tests
specs: 'chromeTests/*'
}, {
'browserName': 'firefox',
// run tests in parallel
shardTestFiles: true

baseUrl: '',

4) Run the test:

Start the test with the command:
protractor conf.js

The test output should be:
1 test, 1 assertions, 0 failures

If you want to learn more, here’s a full tutorial that highlights all of Protractor’s features:

Play here, play there, play anywhere with Android

I still remember my first gaming console. For months I was hooked on blocky 8-bit scenes with a repetitive soundtrack of bloops and bleeps. Back then the graphics were primitive, the choice of titles was limited, and gaming was strictly an indoors activity. Today, things are different.

We recently launched Nexus Player, the first streaming media and gaming device that brings Android to your TV. Thanks to thousands of games and free online multiplayer, Android is already the first choice for many casual and experienced gamers. And with Android now on screens big and small, you can sneak a quick game while you’re out on the road, then keep playing at home on your HDTV. 

Nexus Player makes the perfect holiday gift for family fun and immersive play on the biggest screen in your home. Here’s a quick look at some upcoming titles and a round-up of recently-launched favorites.

Rayman Fiesta Run brings Ubisoft’s classic, wacky and lovable character Rayman to your living room. Jumping and rolling through this beautiful fantasy world looks incredible on your TV. And if you grew up like me, spending countless hours collecting video game stars and coins, you’ll quickly fall for this title with a Gamepad for Nexus Player.

New games are coming in every week and there are now more than 60 titles available on Google Play. Some of our favorite new arrivals include:

  • Bike Rivals: an adrenaline-packed stunt racing game that uses the Nexus Player remote 
  • Prime World: Defenders: a classic tower defense game with awesome 3D graphics 
  • Goat Simulator: because who hasn’t dreamt of causing chaos as a goat? 

And coming soon:

  • NBA Jam: a classic, reborn – slam-dunk on your friends with multiple gamepads, phones and tablets
  • Valiant Hearts: a thoughtful warrior’s journey through World War I, realized as an action game 

If you’re looking for a great way to spend the holidays, or to level up your love for Android gaming, grab the Nexus Player and Gamepad for Nexus Player in the Play Store. Nexus Player comes with Badland and a $20 Google Play credit that you can use for games, movies and more.

Enjoy the holidays, whatever (and wherever) you’re playing!

Posted by Jamil Moledina, Games Strategic Partnerships Lead and in-office gamer, Google Play

Gig success for Dunedin!

Dunedin was today announced as the winner of Chorus’ Gigatown competition, edging out 49 other towns for the chance to become the first in New Zealand to get access to gigabit speed fibre internet. This means that in addition to having the world's steepest residential street, Dunedin will also have New Zealand’s fastest internet: ten times the speed of the fastest fibre broadband currently available.

The competition showed just how popular fast internet is among Kiwis. In fact, if the 132,780 people who signed up to support Gigatown all lived in one place, it would be New Zealand’s 4th largest city, bigger than Hamilton.

Faster internet delivers benefits well beyond better surfing, smoother video and less buffering. It helps make education more fun, interactive and engaging. Students can look forward to taking online classes, connecting with students across the globe or tuning in live to lectures.

Faster internet is also set to become a driving force behind the medical and healthcare applications of the future. Being able to see a doctor remotely, for example, can reduce the need for hospital visits for children with serious health conditions, the elderly and patients with mobility challenges.

And it’s great for small business in New Zealand, helping them create virtual shopfronts to deliver Kiwi products to customers locally - and to export to the world.

It’s great to see people around the country making the most the net. For the lucky residents of Dunedin in particular, it looks like the benefits of faster internet and being connected are set to deliver. Giga time.

Posted by Ross Young, Public Policy Manager, New Zealand

Now casting: Comedy Central, Nick and Sesame Street Go

Chromecast is adding seven more great apps to your casting queue. Get bigger laughs with The Daily Show on Comedy Central, learn with Elmo on Sesame Street Go, or cast Nickelodeon and let Spongebob keep your family entertained. And, no matter how far you travel this winter, stay connected with TuneIn for international radio stations and millions of podcasts. With EPIX, YuppTV and ENCORE Play also casting, you have a full lineup of shows, sports, games and movies to last throughout the holiday season.

Posted by Faisal Feroz, Partner Engineering Manager, Elmo’s best friend

Let Google help you plan a delicious, multi-city meal this Thanksgiving

Break out the stretchy pants: Thanksgiving is right around the corner. Before settling in for a day of family, football and food coma, many weary travelers earn their eats through another time-tested holiday tradition: travel. This year, plan a different kind of holiday — one where you can enjoy your meal on the fly (literally). Check out our jet-setting, turkey-day-travel-itinerary that takes you across 4 historic American cities named after your favorite Thanksgiving eats, like Cranberry Country, WI and Pie Town, NM. Planning your adventure is easy with Google travel tools that can help you quickly find the best flights, hotels and things to do.

You can use the itinerary we’ve saved as your recipe for adventure or go to to quickly and easily plan your own multi-city meal — selecting the destinations and portions that appeal to you.
Take our suggestion and start your edible itinerary with the star of the show: the turkey. Fly into AMA (Amarillo, TX) and drive to the small town of Turkey, TX. With a population of less than 1,000 and an annual festival honoring native son and Western Swing musician Bob Wills, it’ll be a leisurely visit. Swing by the dry goods shop on Main Street, or check out the Bob Wills Museum, with twice-weekly live music shows.

Once you’ve had your fill of Turkey, TX, hop a flight to JAX (Jacksonville, FL) and make the quick 50-minute drive to Spuds, FL to indulge in everyone’s favorite starchy side dish. Primarily a farming community, the main crop in Spuds is — you guessed it — potatoes. Only 20 minutes away is St. Augustine, the oldest European settlement in the country. You can enjoy a variety of historically themed activities to indulge your turkey day traditionalist, including the Colonial Quarter and the Florida Agricultural Museum.

Up next? A visit to Cranberry Country by way of MKE (Milwaukee, WI). Take a relaxing drive on the scenic Cranberry Highway with nearly 50 miles of cranberry bogs, some that have been functioning farms since the 1870s. You can also take a 2-hour drive to Chicago where there are plenty of Thanksgiving-themed events to keep you entertained. Bundle up on Thursday morning to watch the 81st Annual McDonald’s Thanksgiving Parade, featuring floats, local celebrities and marching bands.

When the tryptophan finally kicks in, ask Google to show you “Hotels in Chicago” and you’ll see several options available. Select your preferred hotel and quickly book with one of our travel partners. Hit the town early the next morning for a day of Black Friday deals along the famed Magnificent Mile, where for over 50 years, the trees along Michigan Avenue have been draped with thousands of twinkling holiday lights.

There’s no better way to end your meal than in aptly-named Pie Town, NM. After landing in ABQ (Albuquerque, NM), settle in for a 2.5-hour drive to the tiny community made famous for its proximity to the Continental Divide and its pie. Try Pie-o-Neer Pies, a Travel + Leisure featured restaurant. It’s known for chocolate pies, butterscotch pies and New Mexico Apple pie made with green chiles and pine nuts. Sure, it’s a bit of a departure from tradition, but after this whirlwind Thanksgiving food tour, a spicy slice sounds just right.

Hungry yet? Why don’t you invite a friend to join you on this tasty, turkey-day trip. Select “Share this itinerary” and your friend will receive an email summary like the one below. When they select the blue button reading, “View on Google”, they’ll be directed to Flight Search where they can see the full itinerary and quickly complete their booking so they can join you on this multi-city, meal march.

Whether you decide to follow our recipe or plan your own Thanksgiving adventure, we hope you’ll see how fast and easy it is to use Google to find the best flights, hotels and things to do on your next trip.

Source: Google Travel

Google Launchpad Online now in Africa

Last June we started a new program for tech start-ups around the world - Google Developers Start-up Launch. In addition to events like Launchpad and online content, the program offers participants Google Cloud Platform and Adwords product credits.

We introduced the Start-up Launch program to hundreds of entrepreneurs in Uganda, Kenya, Nigeria, Senegal, and South Africa during the Google for Entrepreneurs week that ran from October 20th to 25th, and so far over 200 start-ups in Africa, and more than 3,000 entrepreneurs in 150 countries are taking advantage of the offering. We spoke to several entrepreneurs from Nairobi, Lagos, and South Africa about their experiences getting started in Africa - hear what they learned in these Spotlight videos.

To bring the program to you, last week, we announced a new video series called Launchpad Online, aimed at helping you get your tech start-up up and running. The series answers questions we have received from entrepreneurs in the program, and kicks off with technical instruction on Google APIs from Developer Advocate +Wesley Chun.

If you’re working on a startup, we’d like to hear from you. Apply for into the Google Developers Startup Launch Program at We hope to see you there!

Posted by Elijah Kitaka, Program Manager


Google Launchpad Online maintenant disponible en Afrique

En juin dernier, nous avons lancé un nouveau programme destiné aux start-up technologiques du monde entier intitulé - Google Developers Start-up Launch. En plus des événements tels que Launchpad et le contenu en ligne, cette programme offre aux participants des crédits sur la produits Google Cloud Platform  et AdWords.

À l’occasion de la semaine Google for Entrepreneurs qui s’est tenue du 20 au 25 octobre, nous avons présenté le programme Start-up Launch à des centaines de chefs d’entreprise en Ouganda, au Kenya, au Nigeria, au Sénégal et en Afrique du Sud. À ce jour, plus de 200 start-up africaines et plus de 3 000 entrepreneurs répartis dans 150 pays bénéficient de cette offre. Nous avons rencontré plusieurs entrepreneurs basés à Nairobi, à Lagos et en Afrique du Sud pour nous parler de leur expérience de création d’entreprise en Afrique – retrouvez leur témoignages dans ces vidéos.

Afin de vous présenter ce programme, nous avons annoncé la semaine dernière, la mise en ligne d’une nouvelle série de vidéos - Launchpad Online - afin de vous accompagner dans la création et la gestion de votre start-up technologique. Cette série a pour but de répondre aux questions posées par les entrepreneurs qui participent à ce programme et inclut des instructions techniques sur les API Google signées +Wesley Chun, expert développeur.

Si vous travaillez sur un projet de start-up, votre avis nous intéresse. Déposez votre demande de participation au Programme Google Developers Startup Launch sur À très bientôt !

Publié par Elijah Kitaka, Responsable Programme

Want your URL to match your channel?

When Tati joined YouTube, her username was GlamLifeGuru, which made her channel’s URL But as her channel grew, her fans embraced “Tati” as her brand. So her channel web address – which is often the quickest way for her fans to watch more of her content – didn’t match her channel name and branding.

To make sure that creators like Tati and all of you have a consistent place for new and existing fans to find you, we’re introducing an easier way to pick custom URLs that match your channel names and branding.

From this week, if you’re a creator with at least 500 subscribers, you may receive emails and in-product notifications if your updated custom URL is ready to claim. You’ll see several options waiting for you that are based on your channel’s description, Google identity and associated websites. If you want to select your URL, all you have to do is follow these instructions. Once selected, the new URL will automatically direct fans to your channel.

Not yet reached 500 subscribers? Try these tips to help your channel grow. And don’t worry – in the meantime your current URL will continue to connect people to your YouTube channel.

Laura Rapin, Product Specialist, recently watched Lemonade - Alex Boye

Want your URL to match your channel?

When Tati joined YouTube, her username was GlamLifeGuru, which made her channel’s URL But as her channel grew, her fans embraced “Tati” as her brand. So her channel web address -- often the quickest way back for her fans to watch more of her content -- didn’t match her channel name and branding.

To make sure creators like Tati and all of you have a consistent place for new and existing fans to find you, we’re introducing an easier way to pick custom URLs that match your channel names and branding.

Starting this week, if you’re a creator with at least 500 subscribers, you may receive emails and in-product notifications if your updated custom URL is ready to claim. You’ll see several options waiting for you that are based on your channel’s description, Google identity and associated websites. When you want to pick your URL, all you have to do is follow these instructions. Once you pick one, the new URL will automatically direct fans to your channel.

Don’t have 500 subscribers yet? Try these tips to spur your growth. And don’t worry, in the meantime your regular URL will continue to connect people to your YouTube channel.

Laura Rapin, Product Specialist, recently watched Lemonade - Alex Boye’

Richer mobile shopping experience this holiday season

Cross-posted from the Inside AdWords blog

More than ever, people are searching on their devices at all hours and places. As a result, we’ve seen a 3.5X increase in shopping searches coming from smartphones year-on-year, and this continues to grow.1 And we’re currently sending more mobile traffic to retailers per week from Google Shopping than we did during the peak of last holiday season.2 So we're making it easier to find the information and images people need to make shopping better on mobile.

Providing richer mobile shopping experiences

Shoppers often want to see more detailed information about a product before making a purchase decision. Now, when they search for a specific product on their smartphone or tablet, we show an expandable product card with rich product content such as reviews and details for that item. For example, on a query such as the Nexus 10, results will show the image of the product along with merchants who carry this tablet, detailed information on the product, and product reviews from customers.

Product card on mobile

And for shoppers who procrastinate buying gifts until Christmas Eve (or can't wait for presents to arrive in the mail) we’re bringing the local shopping experience to more people with local inventory ads on tablet. Shoppers can now find products nearby using any device, which means that advertisers can promote their local products throughout the holiday season - even after the holiday shipping cutoffs have passed.

Local inventory ad, local storefront and related items on tablet

We're also helping to bring products to life on Google Shopping by allowing people to view images from multiple sources and explore products from any angle. Shoppers can now rotate selected products in 360 degrees to see them in more detail on mobile.

360 degree views on mobile

To ensure your products are visible to smartphone shoppers this holiday season, be sure to take advantage of Auction insights segmented by device. Evaluate how you stack up against your competition, identify missed opportunities and refine your bid modifier strategy to gain a greater share of voice on mobile. Check out our recent post on new reporting launches for more information on new insights now available in Shopping campaigns.


1Global Google Internal Data, Week of 10/25-10/31 ‘13 to ‘14. Shopping searches are defined here as queries from a smartphone that trigger a Product Listing Ad.
2 Global Google Internal Data, Week of 12/2-12/8 ‘13 compared to 11/1-11/7 ‘14. Mobile traffic is defined here as traffic from smartphones.

Sky Force 2014 Reimagined for Android TV

By Jamil Moledina, Games Strategic Partnerships Lead, Google Play

In the coming months, we’ll be seeing more media players, like the recently released Nexus Player, and TVs from partners with Android TV built-in hit the market. While there’s plenty of information available about the technical aspects of adapting your app or game to Android TV, it’s also useful to consider design changes to optimize for the living room. That way you can provide lasting engagement for existing fans as well as new players discovering your game in this new setting. Here are three things one developer did, and how you can do them too.

Infinite Dreams is an indie studio out of Poland, co-founded by hardcore game fans Tomasz Kostrzewski and Marek Wyszyński. With Sky Force 2014 TV, they brought their hit arcade style game to Android TV in a particularly clever way. The mobile-based version of Sky Force 2014 reimaged the 2004 classic by introducing stunning 3D visuals, and a free-to-download business model using in-app purchasing and competitive tournaments to increase engagement. In bringing Sky Force 2014 to TV, they found ways to factor in the play style, play sessions, and real-world social context of the living room, while paying homage to the title’s classic arcade heritage. As Wyszyński puts it, “We decided not to take any shortcuts, we wanted to make the game feel like it was designed to be played on TV.”


For starters, Sky Force 2014 is played vertically on a smartphone or tablet, also known as portrait mode. In the game, you’re piloting a powerful fighter plane flying up the screen over a scrolling landscape, targeting waves of steampunk enemies coming down at you. You can see far enough up the screen, enabling you to plan your attacks and dodge enemies in advance.
Vertical play on the mobile version
When bringing the game to TV, the quickest approach would have been to preserve that vertical orientation of the gameplay, by pillarboxing the field of play.

With Sky Force 2014, Infinite Dreams considered their options, and decided to scale the gameplay horizontally, in landscape mode, and recompose the view and combat elements. You’re still aiming up the screen, but the world below and the enemies coming at you are filling out a much wider field of view. They also completely reworked the UI to be comfortably operated with a gamepad or simple remote. From Wyszyński’s point of view, “We really didn't want to just add support for remote and gamepad on top of what we had because we felt it would not work very well.” This approach gives the play experience a much more immersive field of view, putting you right there in the middle of the action. More information on designing for landscape orientation can be found here.


Like all mobile game developers building for the TV, Infinite Dreams had to figure out how to adapt touch input onto a controller. Sky Force 2014 TV accepts both remote control and gamepad controller input. Both are well-tuned, and fighter handling is natural and responsive, but Infinite Dreams didn’t stop there. They took the opportunity to add cooperative multiplayer functionality to take advantage of the wider field of view from a TV. In this way, they not only scaled the visuals of the game to the living room, but also factored in that it’s a living room where people play together. Given the extended lateral patterns of advancing enemies, multiplayer strategies emerge, like “divide and conquer,” or “I got your back” for players of different skill levels. More information about adding controller support to your Android game can be found here, handling controller actions here, and mapping each player’s paired controllers here.
Players battle side by side in the Android TV version

Business Model

Infinite Dreams is also experimenting with monetization and extending play session length. The TV version replaces several $1.99 in-app purchases and timers with a try-before-you-buy model which charges $4.99 after playing the first 2 levels for free. We’ve seen this single purchase model prove successful with other arcade action games like Mediocre’s Smash Hit for smartphones and tablets, in which the purchase unlocks checkpoint saves. We’re also seeing strong arcade action games like Vector Unit’s Beach Buggy Racing and Ubisoft’s Hungry Shark Evolution retain their existing in-app purchase models for Android TV. More information on setting up your games for these varied business models can be found here. We’ll be tracking and sharing these variations in business models on Android TV, including variations in premium, as the Android TV platform grows.

Reflecting on the work involved in making these changes, Wyszyński says, “From a technical point of view the process was not really so difficult – it took us about a month of work to incorporate all of the features and we are very happy with the results.” Take a moment to check out Sky Force 2014 TV on a Nexus Player and the other games in the Android TV collection on Google Play, most of which made no design changes and still play well on a TV. Consider your own starting point, take a look at the Android TV starting point on our developer blog, and build the version of your game that would be most satisfying to players on the couch.