+

Search Tips   |   Advanced Search


Methods of the Selenium wrapper

You can just launch your tests without specifying particular options or you can use the Design option and several dedicated methods on top of the Selenium driver to specify the scenarios you want to update.

Method

Description

Example

NLWebDriver(Selenium webdriver,Name of the NeoLoad User Path, path to the NL project);

NLWebDriver is the constructor of the NeoLoad webdriver.

This constructor allows you to specify the project that is to be updated with the new/updated User Path.

var webDriver = new FirefoxDriver(NLWebDriverFactory.AddProxyCapabilitiesIfNecessary(new DesiredCapabilities()));

string projectPath = "C:\\Users\\dregnier\\Documents\\NeoLoad Projects\\v5.3\\Sample_Project\\Sample_Project.nlp";

NLWebDriver driver = NLWebDriverFactory.NewNLWebDriver(webDriver, "SeleniumUserPath", projectPath);

NLWebDriver(Selenium webdriver,Name of the NeoLoad User Path);

Project path is optional.

If the project is not specified, the wrapper will use the currently opened project.

var webDriver = new FirefoxDriver(NLWebDriverFactory.AddProxyCapabilitiesIfNecessary(new DesiredCapabilities()));

NLWebDriver driver = NLWebDriverFactory.NewNLWebDriver(webDriver, "SeleniumUserPath");

StartTransaction(Name of the current transaction);

This method sends all the Selenium HTTP/HTTPS traffic into a specific NeoLoad container.

This methods needs to be used before the Selenium actions related to a business transaction.

public void TestGetAlerts() {

driver.StartTransaction("home2");

driver.Url = "http://ushahidi.demo.neotys.com/";

driver.StartTransaction("alerts");

driver.FindElement(By.PartialLinkText("GET ALERTS")).Click();

}


Home