Showing posts with label Web Driver. Show all posts
Showing posts with label Web Driver. Show all posts

8 Ways to locate an element using Selenium - Java

For testing an application you need to first locate an element.There are many ways to select an element .

  • By ID. 
  • By name.
  • By class name.
  • By tag name.
  • By link text.
  • By partial link text.
  • By CSS.
  • By XPath.

Maximize Browser Window or Set Browser Size using Selenium Web driver - Java

                               Often we end up having to test the website on how it behaves in different screen resolutions.Here selenium provides us with two things one is to set the browser to a maximum size of the screen the browser is open on and the other is to provide the dimensions and set it.

Basic Selenium Web Driver Program using Java

                           The most basic thing we have to do is to select an element and display the title of the article or a page.Let us display the title or contents of our website using a simple java program using selenium.
                           You need to know basics of  how to use eclipse and how to add libraries(jar) files to your eclipse Java project.