Posts

Showing posts from January, 2019

HTML Success Page

You logged into a secure area! x Secure Area Welcome to the Secure Area. When you are done click logout below. Logout Click me

Test HTML Page

First name: Click me to change my text color. Username Password Click me  

Object Oriented Programming Pillars

We have already discussed OOP in our first lecture of this course. Today we will talk about below 4 pillars of OOP Abstraction Encapsulation Inheritance Polymorphism Abstraction Abstraction is a concept aiming to hide relevant data about an object and expose a high-level mechanism for using it, which in turn increase efficiency and reduce complexity. For example, In Test Automation we use IWebDriver object for communication with the browser, we can open the URL and close the browser using available methods. Here we are not aware of how the communication with the browser is actually done.  In Simple terms, IWebDriver object hides all the internal details and gives us methods for using it  Below sample code IWebDriver  driver  =   new   ChromeDriver (); driver . Navigate() . GoToUrl( "https://www.google.com/" ); driver . Close(); Its ok, if you do not understand the code for now. We will talk about IWebdDriver in coming lectures Here GoToUrl an

Exception Handling

In this lecture, we will talk about one of the most important topics every automation tester should know ...Exception Handling So whats an Exception? Well, they are problems in your code that occur during the execution of a program. Why Do I Handle Them? If not handled, the program execution terminates Ok, Tell Me How To Handle Them? Exceptions can be handled using 3 keywords(try, catch and finally) We will take our previous lecture example of querying dictionary with a key whose entry is not added in the dictionary. Check the below code //Initialization Dictionary < string ,   string >   stateCollection   =   new   Dictionary < string ,   string >(); //Adding Data stateCollection . Add ( "CA" ,   "California" ); stateCollection . Add ( "CO" ,   "Colorado" ); stateCollection . Add ( "NY" ,   "New York" ); stateCollection . Add ( "TX" ,   "Texas" );   //Querying Dict

Collection and Generics-Part 2(List and Dictionaries)

One can manage a group of items/objects using arrays or collections, we have already talked about arrays in the previous lecture, today we will talk about collections Collections provide a more flexible way to work with a group of objects. Yes flexible, collections can grow and shrink dynamically . One of the greatest advantage over Arrays. There are many collections provided by .Net framework, we will look at the most used collection classes Generic List Strongly typed list of elements that can be accessed by using positional index number. Declaration List < string >   EmpNameList ; Declared EmpNameList which will hold elements of type string Initialization EmpNameList   =   new   List < string >(); Operations //Add Element              EmpNameList . Add ( "Employee1" );              //Remove Element              EmpNameList . Remove ( "Employee1" );              //Add at specified index              EmpNameLi

Collection and Generics-Part 1(Arrays and Generics)

In our automation project, we would come across scenarios where we need to deal with a group of items, some examples below We got employee data from the application, which contains 20+ records and we need to check if a specific employee exists or not We need test data for testing application, say 20 records of the employee (employee name, Id, Address etc). And Many more... Well, you will say, One can use Arrays to deal with a group of items. You are right. One can manage a group of items/objects using arrays or collections, we will take look at both in this lecture Arrays Arrays are fixed size list of elements that can be accessed using a positional index number. Arrays are used mostly when the size of the list is known at design time. We will look at some array operations Array Declaration  //Declaration string []   EmpName ; Here we have declared EmpName Array which will have string elements Array Initialization //Initializing Array EmpNam