In This Course

Did you know that a recent poll revealed that 80% of QA Automation Engineers cannot run more than 100 functional tests daily, with 95% reliability? Furthermore, over 50% of these Automation Engineers struggle to run between 0 – 50 automated functional tests per day! Functional test automation is a hard job. However, you can make your job much easier by learning a pattern known as the Page Object Pattern. The Page Object Pattern helps to resolve a lot of the problems that other automation techniques cannot. Making your test automation more stable as a result.

This course is designed to teach you how to properly code the Page Object Pattern using Selenium Webdriver with C#.

However, all of the information here is equally applicable to any other functional testing tool. It is because the Page Object Pattern is a universal principle that makes test automation more robust. Similar to other universal concepts such as Don’t Repeat Yourself or Single Responsibility Principle.

Therefore, if you know Object Oriented programming and a different functional automation tool, you can still comfortably follow along with all of the principles and patterns that I lay out in this course.

In this course, you will learn:

– Why other methods such as Record & Replay or Keyword Driven do not work when it comes to test automation

– What the Page Object Pattern is in automation

– Advantages and disadvantages of the Page Objects

-Amazing tips and tricks on how to:

  • Implement the Page Objects using Selenium Webdriver
  • Improve your Page Objects to follow DRY Principle
  • Improve Page Objects to follow SRP Principle
  • Create amazing Page Objects for gigantic web pages

Free Video Course

In This Lecture

In the previous video, we learned the prerequisites of the page objects in test automation course. In this video, we are going through the what to do when you run into errors for the course.

What to do when you run into errors

I’m sorry, I have some bad news for you.

Inevitably you are going to run into errors, and you are going to have to figure out how to deal with those errors.

Every QA automation engineer does, and it’s part of the job.

I run into errors every single day and it’s just a matter of figuring out how to deal with those errors.

Step 1 is to debug your code.

Read the error messages in in your IDE.

IDE these days are pretty smart, and they give you fantastic error messages that you can look at and understand the error that is being shown to you.

IDEs even give you a line number and a character name that will point you to the right place where your error occurs.

Go to that location and see what the IDE complains about.

Usually, there is some kind of a squidgy line pointing you to the error.

Try to fix it.

If that doesn’t work, you can try to restart by going back to before you created that error.

Use keyboard shortcuts, such as CONTROL-Z, to go back, and CONTROL Y to redo.

You can press CONTROL Z to undo your code to a previous state that was working. And then slowly, line by line add the code in again until you see the breaking point.

If you don’t see the breaking point, fantastic.

But if you do, now you know which line of code caused that breaking point.

If restarting doesn’t work for you either, you can then try to compare the code that you have to the code that I provided for you in the course.

You can pull out the code in any IDE, side by side and use a Diff tool.

If for any reason, your IDE doesn’t have a Diff tool, or you are just not using an IDE, you can even use something like Notepad, ++Compare plug-in to show you the differences in my code and your code.

For example.

This is a sample Diff in a Notepad++ that show you the difference between 2 files, you can just as easily do this with any code files.

If none of those work, step number 2is to check my blog.

I’ve been doing this now for a number of years now, and I’ve received the same questions over and over.

So, what I have done is create a blog post that contains the common Selenium Driver errors, so if you go to that URL, you will be able to find a bunch of common Selenium Driver errors and how to fix it.

If you don’t want to remember that URL, you can just as easily go my website and search for the string Selenium errors.

Is going to pull you up the blog post.

Let me show you what I mean.

So, this is the blog post that I’m talking about. It’s called ‘Common Selenium Web driver errors and how to fix them’, located at this URL.

You can come here and look for the specific error that is in question and then find the solution and how to fix it.

If you don’t want to type out all that URL, you can just as easily come to, search for Selenium errors, and the first article that you are going to get is the article that you want.

Then you can peruse through it again and get your errors fixed here.

I update this article all the time.

As soon as I find a common error that everybody is facing, I’m putting them in here.

If none of those solutions work, you can move on to step number 3, which is finding solutions online.

This is what makes you amazing QA engineer, no I’m just kidding, it’s just part of the job, going online and finding solutions.

I do it every single day, that’s sole standard.

My favorite place to go is Google.

All you have to do is go to Google, put in your error message, and the programming language that you are looking for, and then it will get you back a bunch of solutions.

Let me give you an example.

If we go back to this blog post, and I just come here and copy this error message here.

Go to Google, type that error message in and puts c#.

I’m going to get back a bunch of results.

I can go through those results, read what the people are saying. Try to apply those solutions, and see if it works.

Most of the time, 99% out of 100, someone in the work has already had a similar problem as you. Therefore, you will be able to find some solution.

And I give you a hint, all of these errors, that are located in here. Most of the solutions, I have found myself, online. And I just I did a better job documenting them for you.

Finally, if none of those steps work, you are allowed to ask good questions and that’s why I’m here to help, along with our amazing automation testing community.

The key is to ask good questions.

Go to the same URL that I’ve shown you before, for Common Selenium Webdriver errors, and leave a comment there documenting your error.

Make sure that you are positive, you don’t need to be upset.

Everybody has problems with their code.

I have them every single day, and if you are positive and just state your error, everything is going to be much better than you getting upset.

I’ve seen too many people, and too many co-workers, constantly getting upset over errors, when there’s no need.

It’s just part of our job.

Furthermore, I have experienced hundreds, if not thousands of questions for you guys, and so, what you need to do, is concise and specific in your question.

Don’t give me the code to your entire solution, you need to make it easy for the person trying to help to give you the answer.

Therefore give the specific part of the code that doesn’t work and your problem, a screenshot or copy and pasting the code is helpful, formatting the code in a really nice way is extremely helpful to the people that are trying to help you.

If you make it easy for other people to help you, they will be more willing to help, but if we have to spend 20 or 30 minutes trying to understand what your code is doing, no one is going to try to help you, so make it easy for us, and we would be glad to help.

Finally, just say thanks to the person that’s helped.

So many times I’ve seen that people would get help, and then they don’t come back to say thanks.

Sometimes I know that the error was probably fixed, but because nobody came back to say thanks, I’m not sure if that’s resolved their problem, and neither has anyone else.

So, again, just got to that page, come down her to the bottom and just write a single comment of the problem that you are facing.

The way this looks, of course, may change, but that doesn’t matter.

Just come here, write the problem that you are having and our community will do our best to answer it.

And I sorry that this button is so green and ugly, I promise that I will change it.