Posts

Showing posts from 2020

What is the use of TestNG Library and confing.properties?

Image
What is TestNG Framework? TestNG is a Java testing framework for complex integrated Testing. it is designed to simplify all our testing requirements such as functional testing, regression, end-to-end testing. Installation of TestNG Open Eclipse IDE Click on the Help menu Click on Install New Software The window will popup Click on the Add button In the name input box, type “TestNG” In the location input box, type url “ http://beust.com/eclipse ” Click on Add The window will open with TestNG result Select TestNG Click on Next  Accept the Licence agreement Click on Finish If you encounter a Security warning, just click "Install Anyway". Wait for the installation to finish. When Eclipse prompts you for a restart, click "Restart now." Use of TestNG library Annotations are easier to use and understand.Test cases can be grouped more easily. @BeforeSuite : The annotated method will be run before all tests in this suite have run. @BeforeTest: The annotated method will be r...

What is Selenium WebDriver?

Image
  What is selenium? Selenium is an open-source automated testing framework which is used to validate web applications across different browsers and platforms. We can use multiple programming languages like java, c#, python to create test scripts. What is WebDriver? WebDriver is a bunch of API (Application programming interface) for DOM (Document Object Model) interaction and Browser control. How to download selenium webdriver? Selenium installation is a 3 step process: Install Java SDK Install Eclipse Install Selenium Driver File Open the below link https://www.selenium.dev/downloads/ Go to the Selenium Client & WebDriver Language Bindings section. Choose your convenient language & clicks on Download link This download comes as a ZIP file named "selenium-3.14.0.zip". Configure Eclipse IDE with Webdriver Launch the "eclipse.exe" file inside the "eclipse" folder When asked to select for a workspace, just accept the default location. Create a ne...

iii) Java Basics for Selenium (static and non-static concept)

Image
Static Variable: Static variable in Java is a variable that belongs to the class and initialized only once at the start of the execution. It is a variable that belongs to the class and not to object(instance ). Static variables occupy the memory when program execution starts. Example.,  static int i; Static Method: Static method in Java is a method which belongs to the class and not to the object. A static method can access only static data. A static method can call only other static methods and can not call a non-static method from it. A static method can be accessed directly by the class name and doesn’t need any object Example., public static void function_name( ){ } Non Static Variable: A non-static variable does ot have the keyword static before the name of the variable. Any variable of a class which is not static is called a non-static variable or an instance variable. Non-static variable occupies the memory when necessary and after use releases the memory. Example.,...