Unanswered question

Its not ending/completing validation while running Selenium WebDriver script in NeoLoad Virtual Path ?

I have the below code. I exported into a Runnable Jar file and integrated with NeoLoad.

package IRCTCReservation;

import com.neotys.selenium.proxies.NLWebDriver;
import com.neotys.selenium.proxies.WebDriverProxy;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.By;
import java.io.IOException;

public class TicketBooking
{
public static void main(String[] args) throws InterruptedException, IOException
{
System.setProperty("webdriver.gecko.driver","C:/Users/ex/Desktop/Softwares/Softwares/geckodriver.exe");
NLWebDriver driver = WebDriverProxy.newInstance(new FirefoxDriver());

driver.startTransaction("TC01_IRCTC_01_Launch");
driver.get("https://www.irctc.co.in";);
driver.stopTransaction();

driver.manage().window().maximize();
String title= driver.getTitle();
System.out.println("Title:"+ title);

Thread.sleep(3000);

WebElement emailElement = driver.findElement(By.id("usernameId"));
emailElement.sendKeys("keemo123");
WebElement passwordElement = driver.findElement(By.name("j_password"));
passwordElement.sendKeys("NewYear@2018");

Thread.sleep(10000);

driver.startTransaction("TC01_IRCTC_02_Login");
WebElement loginElement = driver.findElement(By.id("loginbutton"));
loginElement.click();
driver.stopTransaction();

Thread.sleep(3000);

driver.findElement(By.id("jpform:fromStation")).sendKeys("KSR BENGALURU - SBC");
driver.findElement(By.id("jpform:toStation")).sendKeys("ERNAKULAM JN - ERS");
driver.findElement(By.id("jpform:journeyDateInputDate")).sendKeys("31-01-2018");

driver.startTransaction("TC01_IRCTC_03_Search");
driver.findElement(By.id("jpform:jpsubmit")).click();
driver.stopTransaction();

Thread.sleep(3000);

driver.startTransaction("TC01_IRCTC_04_Logout");
driver.findElement(By.linkText("Sign Out")).click();
driver.stopTransaction();

}
}

When I run a virtual path validation. It's not completing/ ending running virtual path.

Please refer screenshots.

Help me to:
1. validate a virtual path and how to run with more number of users.
2. While running its opening a browser. Is there a way to do load testing without opening browser explicitly unlike selenium web driver.

Thankyou very much !

Moulali N.
Moulali N.

Moulali N.

Level
0
20 / 100
points

Answers

Alexis N.
Alexis N.

Alexis N.

Level
2
1255 / 2000
points
Team

It might be a timeout issue, can you try to add the following line after the Firefox driver initialization:
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

NeoLoad integration with Selenium purpose is not to perform load testing but it allows:
-Optimizes staff time: Allows to reuse functional scripts to create performance scripts
-Gives insight across the entire delivery chain: up until the end-user browser or device

But with your Selenium script you can easily create a NeoLoad script. You will find more information here: https://www.neotys.com/documents/doc/neoload/latest/en/ht...

Hope it helps.