Showing posts with label selenium tutorial. Show all posts
Showing posts with label selenium tutorial. Show all posts

WebDriver interface has many different methods and get method is one of them. WebDriver interface is implemented by different browser classes like ChromeDriver, EdgeDriver, EventFiringWebDriver, FirefoxDriver, InternetExplorerDriver, OperaDriver, RemoteWebDriver and SafariDriver. So you can use get method to open any of these browser with given URL syntax.

get Method
  • Method Name : get
  • Method description : Using HTTP GET operation, It will load new web page in current web browser window. It will block all other operations until the browser load is completed. That means, Next syntax will be executed only after browser loaded completely with given URL.
  • Syntax : driver.get(String arg0)
  • Example : driver.get("");

Since last update of selenium 3, Most of the users(especially those who are new with selenium) are facing common issue with error "Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see The latest version can be downloaded from" when try to execute test in firefox browser.

Configure Geckodriver In Selenium Test

  • LinkedHashMap class is one of the class of map interface which extends HashMap class and implements Map interface.
  • It is combination of linked list and Hash table implementation of the Map interface and that's why it is called LinkedHashMap.
  • It is maintaining doubly-linked list insertion order in which keys were inserted into the map.
  • It allows to store null elements and optional Map operations are also available.
  • It is non synchronized implementation so if any thread modifies map structurally when map is accessed by multiple threads then it must be synchronized externally.

  • Is is pronounced as HashMap because It is hash table based implementation of map interface.
  • It extends AbstractMap class and implements Map interface.
  • It allows to store null key and null values.
  • It is non synchronized implementation so if multiple threads accessing it concurrently and any one of them modifies it then it must be synchronized externally.
  • It does not guarantee of maintaining the map order.

  • Java Map interface represents the mapping between unique keys to values.
  • Map can not hold duplicate values.
  • In Map interface, Each key can map at most one value.
  • Each Map interface provides three different collection views. Using which you can view map's content as a set of keys, collection of values and set of key-value mappings.
  • Map will helps you when you wants to search, update or delete elements based on it's key.
  • The map interface is implemented by different java classes like HashTable, HashMap and TreeMap.

  • TreeSet is class under Set interface of collection framework.
  • It implements NavigableSet interface which extends SortedSet interface.
  • Elements are ordered by a Comparator which is provided at set creation time or by natural ordering.
  • It maintains the ascending sorting order.
  • TreeSet is not synchronized so if multiple threads accessing it concurrently and any one modifies set entry then it must be synchronized externally.
  • Element's access and retrieval time is very fast from TreeSet so it will much useful when you wants to store large information in ascending order and retrieve any element quickly.
Java TreeSet Class hierarchy

  • SortedSet interface extends Set interface in collection framework of java.
  • As name suggest, It provides total ordering on elements of Set.
  • Set elements will be ordered using their natural ordering or using a comparator interface.
  • All the elements entries of SortedSet must implement Comparable interface.
  • All the elements of SortedSet must be comparable. So e1.compareTo(e2) must not throw ClassCastException.
  • In collection framework, TreeSet class is an implementation for the SortedSet interface.
Java SortedSet Interface hierarchy

  • HashSet is a class of collection framework which extends AbstractSet class and implements the Set interface.
  • HasSet doesn't guarantee that elements order will remain same over the time and returned in any random order.
  • HasSet doesn't allow duplicate values. If you try to insert duplicate, It will overwrite.
  • HasSet allows to store null values.
  • HasSet implementation is not synchronized.
Hashset hierarchy in Java Collection

  • LinkedHashSet Class extends extends HashSet class and Implements Set interface in collection interface hierarchy.
  • LinkedHashSet implementation differs from HashSet as it maintains doubly-linked list running through all of its entries.
  • It maintains element's entries in set as per it's insertion order. So it will allow you insertion order iteration over the set. So when you iterate over LinkedHashSet, In which order it will return elements? Answer is As per it's insertion order.
  • So you will get same copy of elements with the order how they inserted in set. 
  • LinkedHashSetis not synchronized.
LinkedHashSet Class hierarchy

  • Set is one of the collection framework interface which extends root Collections interface.
  • Set collection can not contain duplicate elements.
  • Set interface has all methods which are inherited from Collection interface with special restriction of not allowing duplicate elements.
  • If two Set interface contains same elements then both are equal.
  • Set interface is implemented by LinkedHashSet, HashSet classes and extended by SortedSet interface which is implemented by TreeSet.
Java Set Interface hierarchy

  • If you look at collection hierarchy, Queue extends collection interface.
  • Main purpose of collection is to hold the elements prior to processing.
  • Queue interface provides some additional operations like insertion, inspection and extraction besides collection interface operations.
  • All these three operations exist in 2 different forms. One return special value(null or false depending on the operation) if operation fails else throws an exception if operation fails.
  • Queue follows FIFO(first-in-first-out) so it will insert element at the end of the queue when you insert new element and element will be removed from the beginning of the queue when you remove element.
  • As Queue interface is sub type of collection interface, all methods of collection interface are also available in Queue interface.
Queue Interface hierarchy

  • Stack class in java is one of the collection interface class which is subclass of Vector class.
  • Stake class supports usual push and pop operations.
  • In contrast to queue, Stack class has last-in first-out(LIFO) data structure. So item which is inserted at top will be available first.
  • Stack class extends Vector class of List interface so it includes all methods of vector class and also it has it's own several methods to perform push and pop operations like looking top item from stack, removing top item from stack, push new item at top of stack, searching item from stack and check whether stack is empty.
java stack class example

  • Vector class in java implements List interface of collection framework.
  • Vector class is synchronized.
  • If you don't know size of array then you can use vector class as size of vector can grow and shrink as per adding and removing items.
  • As vector class is synchronized, It will give poor performance on add, delete, update and search operations.
  • Elements of vector can be accessed using it's integer index.
vector class hierarchy in java

  • LinkedList class extends AbstractList class.
  • LinkedList class implements List and Deque interfaces.
  • LinkedList class is using doubly linked list to store elements in list.
  • LinkedList can hold duplicate elements in list.
  • LinkedList is non synchronized.
  • Manipulation is faster in linkedlist as shifting is not required when new element is inserted or deleted from list.
  • You can use it as list, stack or queue as it implements List and Deque interfaces of collection framework.

Selenium tutorial for beginner is basic requirement of any selenium learner to learn selenium perfectly if it's free and complete. Selenium is very strong and open-source web application automation testing tool so selenium testing tool is booming now a days in software testing industry.

Selenium has different projects like selenium IDE, selenium RC, selenium Webdriver, Appium and selenium Grid. Please note here, I am saying them different projects of selenium not a versions because each selenium project has it's own features and developed for different purpose.

Selenium Tutorial

I have created tutorial series for different selenium projects with examples to support online selenium learner community. My selenium tutorial for beginners with examples will helps you to learn selenium testing very fast. All bellow given selenium project's tutorials will take you from basic to advanced level step by step and you will be master at the end of series. Trust Me !! Selenium RC is officially deprecated now so i have not created tutorial series for RC. Just start with selenium IDE tutorial series and end on selenium grid tutorial series.

Selenium Tutorial

Bellow is selenium java tutorial series of different selenium projects.

1. Selenium IDE tutorial

Selenium IDE is first project of selenium. It is basic record and playback add-on of firefox browser. You can use selenium IDE if your application is not more complex to test. My Selenium IDE tutorial series will helps you to learn selenium IDE.

2. Selenium WebDriver tutorial

Selenium Webdriver is latest project of selenium which is interface and designed to automate web applications. It is designed to overcome limitations of selenium RC(which is deprecated now.) so it is successor of selenium RC. I have created online Selenium Tutorial for beginner tips expert level selenium learners. Also i have created series of selenium interview questions with 110+ interview questions. It will helps you to face selenium testing tool interview.

3. Appium tutorial

Appium is mobile native, web and hybrid application test automation testing framework. You can automate ios and android apps using appium. Appium Tutorial series is created to describe how appium works with examples.

4. Selenium Grid tutorial

Selenium grid helps you to run your selenium automation tests in parallel on different machines and browsers to speedup your test execution. So you can run your tests on different machines which are running different browsers on different operating systems. Selenium Grid Tutorial series which is created to show you how actually grid can helps you to speed-up your test execution process.

All above selenium tutorial series are created with practical examples and detailed description on each topic. Start selenium learning today to put your step in selenium automation testing industry and also share your new ideas with others.

5. Selenium Video Tutorial

Also you can subscribe for selenium video tutorial if you can pay some bucks for learning. As per my view, investment in education/learning is best investment.

Selenium webdriver is widely used open source automation testing tool in software testing industry which automates browsers. It is very compact object-oriented API which drives browsers natively on local or remote machines just like user interacts with browsers. If you look at the top trending automation testing tools, Selenium Webdriver is on top spot from last 10 to 12 years. It is being used by small scale companies to giant MNCs. As you know, Manual testing takes lots of time and efforts when your web application testing task is repetitive. Selenium automation will reduce your testing time and cost as you need to write selenium script just once and you can use those selenium automation testing scripts again and again whenever required. You can use those scripts mainly for regression testing of web application.

I am suggesting you to first Learn Selenium IDE From This Page and then start bellow given selenium tutorial. 
Selenium Tutorial

Selenium is free and supports many different languages like selenium Java, Python, Pearl, Ruby, PHP and C#. Selenium with java and selenium with python needs special mention here as both these languages are more popular than the other languages in selenium automation. To learn selenium with java, You should have java coding basics knowledge. If you are fresher then you should start java for beginners tutorial and then you can move to selenium tutorial. I have prepared very good set of java beginners tutorials for selenium learners which can help you to boost your java basics. Once you learn java basics, You can start with java advanced tutorials set.