LeanFT with Java
Introduction Supported applications Installation of LeanFT and plugins for IDEs Installing browser Extensions LeanFT settings,Object identification Center Understanding LeanFT SDK API Installing the LeanFT jar files in Maven Repository Creating LeanFT Maven Project Creating LeanFT Project with Gradle and TestNG LeanFT Properties Setting up LeanFT project in IntelliJ IDEA Creating maven project with JUnit with LeanFT in Eclipse Creating maven project with TestNG in Eclipse Description programming Application model Using regular expression in property values First web application test Identifying the Web elements using XPATH and CSS Identifying objects using Visual Relational Identifiers – VRI Handling embedded browser control in Windows app Firing events on Web Elements using LeanFT Executing JavaScript in web page Automating standard windows application Automating Java Application Automating WPF applicationsAutomating SAP Application Synchronization in LeanFT Assertions in LeanFTLeanFT with Cucumber Keyword Driven frameworks Data Driven Frameworks Converting the UFT Object Repository to Application models in LeanFTChallenges of LeanFT automation Working with third party objects using Native Object properties and methods LeanFT common issues and solutionsLeanFT Java ReferencesDescription programming in leanft in Java
Usually in UFT, we use object repository (Application model in LeanFT) to store the objects inside application. So we can use those objects in automation code but we can also use description programming to define new test objects in the code itself. Below example shows how to define new test object using description programming in LeanFT. We have used description programming to define 2 objects of type – EditField and Link. Note that we can multiple property-value pairs to identify the objects.
//Navigate to https://www.softpost.org/selenium-test-page/
browser.navigate("https://www.softpost.org/selenium-test-page/");
browser.sync();
//Build edit box object and set value in it
browser.describe(EditField.class,new EditFieldDescription.Builder()
.id("fn").build()).setValue("Sagar");
//Build link object and click on it.
browser.describe(Link.class, new LinkDescription.Builder()
.tagName("A").innerText("Home").build()).click();
Web development and Automation testing
solutions delivered!!