package com.neoload.userpath; import static com.neotys.selenium.proxies.NLWebDriverFactory.addProxyCapabilitiesIfNecessary; import org.openqa.selenium.By; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.remote.DesiredCapabilities; import com.neotys.selenium.proxies.NLWebDriver; import com.neotys.selenium.proxies.NLWebDriverFactory; public class FirstCase { public static void main(String[] args) throws Exception { final FirefoxDriver webDriver = new FirefoxDriver(addProxyCapabilitiesIfNecessary(new DesiredCapabilities())); // projectPath used to open NeoLoad project, null to use the currently // opened Project. final String projectPath = "PATH TO NEOLOAD PROJECT"; NLWebDriver driver = NLWebDriverFactory.newNLWebDriver(webDriver, "SeleniumUserPath", projectPath); driver.startTransaction("Login"); driver.get("My APPLICATION URL"); Thread.sleep(8000); driver.findElement(By.xpath("//input[@id='InputUsername']")).sendKeys("35577"); driver.findElement(By.xpath("//input[@id='InputPassword']")).sendKeys("demo"); driver.findElement(By.xpath("//button[@class='btn btn-primary']")).click(); Thread.sleep(10000); driver.startTransaction("SearchPAClick"); driver.findElement(By.xpath("//li[8]/a/span[2]/translate")).click(); driver.findElement(By.xpath("//li[3]/ul/li[3]/a/span/span[2]")).click(); Thread.sleep(10000); driver.findElement(By.xpath("//input[@name='GeneralCriteria.CaseReference']")).sendKeys("Test Data"); driver.findElement(By.xpath("(//button[@type='button'])[2]")).click(); driver.quit(); } }