Syed Sayem blog

Selenium Page Object in Golang

Recently I started learning Golang and I want to share with you how I taught myself to program in Golang and created a selenium page object project in Golang. The first thing I did to teach myself to program in Go was to take the Tour of Go

The tour is a great interactive tutorial that helps you get your feet wet with the language. It works right inside your web browser, so you do not have to install anything to get going right away with learning go.

Next, I started reading “Go Programming Language by Alan Donovan”. This really helped me learn how to write code in go. The book teaches you Go in an incremental fashion using simple exercises that build upon each other. It is one of the best ways to learn Go right now.

Once you have some idea on how to program in Go, its time to start writing small a project like Selenium test.

When writing selenium tests, a common pattern is to use Page Objects. Page Objects help you write cleaner tests by encapsulating information about the elements on your application page. A Page Object can be reused across multiple tests, and if the template of your application changes, you only need to update the Page Object.

Selenium doesn’t have any official language binding for Golang, so we will use one of the selenium third-party library for golang.

To get the third-party selenium library, open the terminal and run the following command:

$ go get

Next, install any WebDrivers you plan to use. For Mac OS X (using Homebrew):

$ brew install phantomjs
$ brew install chromedriver
$ brew install selenium-server-standalone

For Arch Linux (using Pacman/Yaourt):

$ yaourt -S selenium-server-standalone
$ yaourt -S chromedriver

Clone the git repo:

$ go get

Project structure

+- pages/
+- page.go
+- home_page.go
+- login_page.go
+- men_page.go
+- women_page.go
+- tests/
+- base_test.go
+- register_test.go
+- login_test.go
+- other_test.go
+- .gitignore
+- Dockerfile
+- docker-compose.yml
+- pom.xml


package pages

type HomePage struct {
Page Page

var account = "#header ..."
var myAccount = "#header-account ..."

func (s *HomePage) GoToAccountPage() *AccountPage {
return &AccountPage{Page:s.Page}

func (s *HomePage) GoToMenPage() *MenPage {
return &MenPage{Page:s.Page}

func (s *HomePage) GoToWomenPage() *WomenPage {
return &WomenPage{Page:s.Page}

func (s *HomePage) GoToAccessoriesPage() *AccessoriesPage {
return &AccessoriesPage{Page:s.Page}

func (s *HomePage) GoToSalePage() *SalePage {
return &SalePage{Page:s.Page}


package main

import (

func TestSelenium(t *testing.T) {

login := pages.HomePage{Page:page}


You can see the full source code in this repository

Android Basics Nanodegree Certificate

Today, I graduated with an Android Basics Nanodegree by Google. The course was co-created by Google and Udacity. Over the last 2 months, I have learned an incredible amount about developing Android app. Not only did I complete the projects neccessary for graduation, but I also created more projects on the side to learn more skills. Over the course of those 2 months, I built 10 Android apps. While I have learned a ton during this period, there is still so much to learn about Android Development.


I decided to start the Android Basics Nanodegree at Udacity because I wanted a guided way of learning by industry professionals. It also helped that they were partnered with a lot of big companies and offered code reviews for all of your projects. While there are a lot of online options for bootcamps, Udacity was by far the cheapest and offered an environment that was more tailored to my style. With great reviews for the course, I signed up for the Nanodegree.

Overall, it was wonderful experience taking Android Basics Nanodegree by Google and graduating successfully. I would highly recommend any beginner or intermediate developer to take the Android Basics Nanodegree on Udacity.

Android Nanodegree scholarship

A few days ago I participated in a competition to get scholarship from Udacity, an online learning platform. The competition is runned until December 31st or until there’s 100 people who finished Android Basic Nanodegree program.


Whoever finished the program from 1st to 100th participant will get full scholarship from Udacity for Android Developer Nanodegree sponsored by Google.


After struggling for a few days to finished the Nanodegree as soon as I can, I got positioned number 128. Which mean I will not get the scholarship but I am happy that I finish the program.


Udacity Android Courses

The sections below include all of Udacity’s Android-related courses, including their Android Basics & Android Developer Nanodegree material.

The complete course list is presently lacking a linear curriculum, so this reference aims to provide a clear, easy to follow path based on each course’s prerequisites. The course order in the “Full Curriculum” sections is structured so that inidividuals with no prior programming experience can work through them from start to finish.

All of the courses can be taken for free; although the paid Nanodegree programs do offer additional benefits, including:

  • a Google-accredited certificate of completion
  • code reviews & guidance by Google-certified instructors
  • access to a course support forum
  • guaranteed job eligibility (Nanodegree Plus)

Full Curriculum

Level Group Course Length Projects
Beginner Preparation Java Ⅰ 6 Weeks  
Beginner Preparation Java Ⅱ 4 Months  
Beginner Preparation Git & GitHub 3 Weeks Contribute to a Repository
Beginner Preparation Install Android Studio 1 Day  
Beginner Core App Development Ⅰ 4 Weeks Score Tracker, Fact List, Quiz, Music Player, Business Info
Beginner Core UI Design 4 Weeks Build Your Own App
Beginner Core Multi-Screen Apps 8 Weeks Report Card, Tour Guide
Beginner Core Networking 5 Weeks Book List, News Reader
Beginner Core UX Design 6 Weeks Build a User-Targeted App
Intermediate Core App Development Ⅱ 2 Weeks Popular Movies, Weather, Build Your Own App
Intermediate Core Material Design 4 Weeks Apply Material Design to News Reader
Intermediate Services Sign-In & Profiles 2 Weeks  
Intermediate Services Maps 2 Weeks  
Intermediate Services Location & Context 2 Weeks  
Intermediate Services Analytics 2 Weeks  
Intermediate Services Ads 2 Weeks  
Intermediate Games Game Design Ⅰ 8 Weeks Breakout Clone
Intermediate Games Game Design Ⅱ 8 Weeks Space Shooter
Advanced Core App Development Ⅲ 6 Weeks Stock Tracker
Advanced Core Optimizing App Performance 4 Weeks  
Advanced Core Firebase 8 Weeks  
Advanced Core Gradle 6 Weeks Joke Teller
Advanced Platforms Android TV & Google Cast 1 Week  
Advanced Platforms Android Wear 2 Weeks Create Wear Interface for Weather App
Advanced Platforms Android Auto 1 Week  


* Course lengths are based on Udacity’s presumed allocation of 6 hours per week.

Nanodegree Outlines

Android Basics

Skill Level:

  • Entering students should be motivated to learn and be comfortable with basic computer skills like managing files, navigating the Internet and running programs.


Also, there are currently Habit Tracker & Inventory Tracker projects listed with the message: “Supporting course content coming in August!”.

Android Developer

Skill Level:

  • Entering students are expected to have prior experience building applications (web or mobile)
  • You should have at least 1-2 years of experience in Java or another object-oriented programming language prior to enrolling.

        App Development Ⅱ
        App Development Ⅲ
        Material Design
        Android Wear

Learning with Treehouse

Treehouse is my code learning platform of choice. There are other online training solutions available like Pluralsight, Infinite Skills, Codecademy and, but I liked Treehouse better because their gamification keeps me motivated to learn more. You earn more points and achievements the further along you go.

My Treehouse profile first-screenshot

Treehouse has a nice UI and slight gamification which lets you score points in different skill sets and collect achievement badges.


Overall, I highly recommend Treehouse. They’ve been a huge help for me, the courses are enjoyable.