পোস্টগুলি

জানুয়ারী, ২০২১ থেকে পোস্টগুলি দেখানো হচ্ছে

Finding elements in Web Page - Part I

ছবি
Finding elements using the id, name, class name, link text, partial link text and tag name. i. Finding elements using the ID attribute: To implement we will follow this url:  https://testpages.herokuapp.com/styled/find-by-playground-test.html  After loading this URL in your browser right click on the selected text and then click on Inspect as shown in the following screenshot: The structure of the element will be showing as highlighted. In our case the id for the selected text is "p1". In Java the syntax for selecting the "p1" id will be following: driver.findElement(By.id(<element ID>)) ii. Find elements using the name attribute Right click on the selected text and click Inspect then we can find the name attribute for the selected text as shown in following screenshot: Here the name attribute to located the selected element is "pName2".  In Java the syntax for selecting the " pName2 " id will be following: driver.findElement(By.name(<e...

Getting Started with Selenium: Set up Selenium-Maven-Java Project in Eclipse

ছবি
 Step by step set up process of test development environment. Step -1: Download and install Eclipse IDE. Eclipse can be downloaded from here  https://www.eclipse.org/downloads/ Step - 2: Then open the Eclipse IDE Step -3. Create a new project by selecting File >> New >> Project Step - 4. Then on the new dialog, select Maven >> Maven Project and click Next Step - 5. Then the new dialog will be displayed. Select the following checkbox as in the screenshot for Create a simple project and you can also select the checkbox for Use default Workspace location . Then click on Next Step - 6. On the new dialog box, insert the Group Id and Artifact Id as in following screenshot and click Finish button Step - 7. Your project will be created similar as following screenshot: Step -8. Select pom.xml from Package Explorer. Step -9. Add the JUnit, TestNG and Selenium WebDriver dependencies as maven entry in pom.xml file inside the <project></project> ta...