Quantcast
Channel: [Q&A - FAQ Neotys] Last questions
Viewing all articles
Browse latest Browse all 2283

Selenium C# integration With neoload error

$
0
0

Team,While integrating selenium SCript with neoload ,I am getting attached snapshot error .I have dowload chrome driver 74 version file from selenium site but still same error .Could anyone help on this.

Apart from this,Could anyone elaborate how we can integrated selenium C# script with neoload with each steps in detail so that i can understand as proper way(after running script , how can we associate script with neoload user path and how can we run script)

Thanks for hearing me in advance

Error Code :- // NUnit 3 tests
// See documentation : https://github.com/nunit/docs/wiki/NUnit-Documentation
using System.Collections;
using System.Collections.Generic;
using NUnit.Framework;
using NeoLoadSelenium.neoload;
using NeoLoadSelenium.neoload.wrapper;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Remote;
using System;
using OpenQA.Selenium.Chrome;

namespace SeleniumCSharpProgramming
{
class TestClass
{
NLWebDriver driver;
[SetUp]
public void Initialize()
{
var options = new ChromeOptions();
NLWebDriverFactory.AddProxyCapabilitiesIfNecessary(options);
///provide chrome driver setup file path
var webDriver = new ChromeDriver(@"H:\SeleniumPracticeProject\SeleniumCSharpProgramming\SeleniumCSharpProgramming\Browser", options);
///create a sample neoload project and set project path
string projectPath = "C:\\Users\\Shiva\\Documents\\NeoLoad Projects\\SeleniumNeoloadDemo\\SeleniumNeoloadDemo.nlp";
//create a user path and give the user path name here
driver = NLWebDriverFactory.NewNLWebDriver(webDriver, "SeleniumUserPath");
}
[Test]
public void OpenAppTest()
{
driver.StartTransaction("home");
driver.Url = "http://ushahidi.demo.neotys.com/";
driver.StopTransaction();
driver.StartTransaction("reports");
driver.FindElement(By.Id("mainmenu")).FindElements(By.TagName("a"))[1].Click();
driver.StopTransaction();
driver.StartTransaction("submit");
driver.FindElement(By.PartialLinkText("SUBMIT")).Click();
driver.StopTransaction();
}
[TearDown]
public void EndTest()
{
driver.Close();
driver.Quit();
}
}
}


Viewing all articles
Browse latest Browse all 2283

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>