Nightwatch.js: Open new window and continue testing in new window

Using Nightwatch.js, let’s say you have a button that opens a new window, and you want to do some testing in that new window, such as checking the new window’s url.

  // open new window button
 .verify.visible('.open-new-window')
 .getAttribute('.open-new-window', 'href', function (link) {
 newWindowUrl = link.value;
 })
 .click('.open-new-window')
 .windowHandles(function(result) {
    var newWindow;
    this.verify.equal(result.value.length, 2, 'There should be 2 windows   open');
    newWindow = result.value[1];
    this.switchWindow(newWindow);
    this.verify.urlContains(newWindowUrl);
})

Notice the windowHandles() function that returns all the windows open in the session, and the switchWindow() function allows you to switch windows and target newWindow.  The context of “this” becomes the new window that you switched to.

Reading materials

When you just want to sit back and read some nerdy things.  This is for your reading pleasure!

If you want to listen to nerdy things, check out my podcast blog post.

Nightwatch.js: Check if a checkbox is checked

This test involves waiting for a checkbox to be visible, clicking on the checkbox, and then verifying that the checkbox has been checked.

The checkbox has the following HTML DOM:

<input type="checkbox" name="vote">

Here is the Nightwatch.js test:

.verify.visible('input[name="vote"]', 'The checkbox named vote is visible')
 .click('input[name="vote"]')
 .waitForElementVisible('body', 1000)
 .element('name', 'vote', function(response) {
 client.elementIdSelected(response.value.ELEMENT, function(result) {
 client.verify.ok(result.value, 'Checkbox is selected');
 });
 })

Scuba Chibi Postmortem #2: Data and Analytics

About two weeks ago on Thursday, June 18th, I released my game Scuba Chibi to the iOS App Store.  You may be wondering, how has it been doing since then?  I’m going to grab data from iTunes Connect App Analytics, Google Analytics, my blog, my Facebook page, and my Twitter.  Let’s see how this game held up day by day, week by week!


iTunes Connect App Analytics

This shows the number of app downloads

IOS Daily Downloads 6/19 - 6/28
IOS Daily Downloads 6/18 – 6/28
IOS Country Downloads 6/19 - 6/28
IOS Country Downloads 6/18 – 6/28

TOTAL APP DOWNLOADS (6/18 – 6/28): ~99-102 (?)


Google Analytics

New Users:

  • THU 6/18: 17
  • FRI 6/19: 37
  • SAT 6/20: 13
  • SUN 6/21: 3
  • MON 6/22: 2
  • TUES 6/23: 1
  • WED 6/24: 4
  • THURS 6/25: 0
  • FRI 6/26: 0
  • SAT 6/27: 3
  • SUN 6/28: 1
  • MON 6/29: 2
  • TUES 6/30: 15
  • WED 7/1: 4
  • THURS 7/2: ?

Active Users:

  • THU 6/18: 19
  • FRI 6/19: 39
  • SAT 6/20: 20
  • SUN 6/21: 11
  • MON 6/22: 7
  • TUES 6/23: 5
  • WED 6/24: 7
  • THURS 6/25: 2
  • FRI 6/26: 5
  • SAT 6/27: 5
  • SUN 6/28: 6
  • MON 6/29: 4
  • TUES 6/30: 19
  • WED 7/1: 6
  • THURS 7/2: ?
New Users / Active Users 6/18 - 7/2
New Users and Active Users 6/18 – 7/2

Countries:

  1. United States: 156 sessions (69.03%)
  2. China: 36 sessions (15.93%)
  3. Germany: 6 sessions (2.65%)
  4. Vietnam: 4 sessions (1.44%)
  5. Switzerland: 3 sessions (1.33%)
  6. United Arab Emirates: 2 sessions (0.88%)
  7. France: 2 sessions (0.88%)
  8. United Kingdom: 2 sessions (0.88%)
  9. Netherlands: 2 sessions (0.88%)
  10. Russia: 2 sessions (0.88%)
  11. Argentina: 1 session (0.44%)
  12. Canada: 1 session (0.44%)
  13. Spain: 1 session (0.44%)
  14. Indonesia: 1 session (0.44%)
  15. India: 1 session (0.44%)
  16. Philippines: 1 session (0.44%)
  17. Poland: 1 session (0.44%)
  18. Venezuela: 1 session (0.44%)
Countries 6/18 - 7/2
Countries 6/18 – 7/2

Top Device Models:

  • iPhone: 142 sessions (77.6%)
  • iPad: 41 sessions (22.4%)

User Engagement:

  • Screen Views: 285
  • Average Time On Screen: 00:02:33
  • Crashes: 0  😀
  • Events:
    • Ad Views: 500
    • Button Clicks:
      • Game Over Menu – Play Again: 367
      • Main Menu – Play Game: 240 
      • Main Menu – View Instructions: 98
      • Instructions Menu – Back to Main Menu: 94
      • Game Over Menu – Back to Main Menu: 52
      • Game Over Menu – Share Facebook: 4
      • Game Over Menu – Share Twitter: 2
    • Score View: Game Over Menu – LocalStorage Score: 147 (this is the number of times the high score was saved in the device’s local storage)
User Engagement 6/18 - 7/2
User Engagement 6/18 – 7/2

WordPress Blog – http://www.melkybee.com/blog

Best Views Ever: 197 on Friday, June 26

Blog Stats - June/July
Blog Stats – June/July

I couldn’t pull data that includes info from 6/18, but here is data from 6/25 – 7/5:

Blog Stats 6/29 - 7/5
Blog Stats 6/29 – 7/5

These are my all-time most popular blog posts:

Top 10 Most Popular Blog Posts
Top 10 Most Popular Blog Posts

Facebook Page – https://facebook.com/scubachibi

Page Likes

  • THU 6/18: 14
  • FRI 6/19: +30
  • SUN 6/21: +11
  • MON 6/22: +3
  • TUES 6/30: +2
    • TOTAL: 60 likes
Facebook Likes 6/18 - 7/2
Facebook Likes 6/18 – 7/2

Twitter – http://twitter.com/scubachibi

THU 6/18 – THU 7/2:

  • Tweets: 4
  • Tweet Impressions: 727
  • Profile Visits: 67
  • Mentions: 1
  • Followers: 43
  • Engagement Rate: 4.3%
  • Link Clicks: 12
  • Retweets: 8
  • Favorites: 12
Tweet Impressions 6/18 - 7/2
Tweet Impressions 6/18 – 7/2

 

Conclusion

What can we draw from this data?  Hrmmm…

  1. Well, I admit that I am no expert in marketing, and I spent $0 on marketing, so the numbers are not high and are also decreasing.  :'(  Lol.
  2. Also, although we saw some low numbers in New Users in Google Analytics, we still saw that there were Active Users each day, even on the days when New Users were at 0.
  3. Interestingly, if the data holds correct, there were more app downloads in China (according to iTunes Connect App Analytics), but more sessions in the U.S. (according to Google Analytics).
  4. Furthermore, the day after the release (Friday, 6/19) had the highest number of downloads, New Users, Active Users, and the highest increase in Facebook likes.  I think it had to do with people seeing the news about the app up to a day late, because the other Fridays don’t necessarily have any high numbers.
  5. There was a bit of an increase in New Users and Active Users on Tuesday, 6/30.  I am not sure how or why that happened.  I didn’t do any blog posts, Facebook posts, or tweets on that day.  Hrmmm!
  6. However, on Friday, 6/26, the Scuba Chibi blog was mentioned on the Phaser website, so that day I received 197 views, my best views ever for my blog!

In my next postmortem, I am going to write about the backstory of Scuba Chibi and how the game evolved into what it became.  It should be interesting from a game design perspective.  Stay tuned!