[Solved] C# Not able to return to my another class file


In your main.cs you need to add one line.

[Test]
public void Test_MyPage()
{
    LoginPageObject objLogin = new LoginPageObject();
    FunctionTest cc = objLogin.FunctionAbcTest();
    FunctionTest objAbcTest = new FunctionTest();
    objAbcTest.SpeedTest();
}

Also change your Xpath to

 [FindsBy(How = How.XPath, Using = "//div[@id='cssmenu']/ul/li[3]/a/span")]
 public IWebElement UserForm { get; set;}

This will solve your problem.

And I think the site you have chosen is to use as an example to show why your function is not working. Probably, your original site id different. And it does not seems to be homework.

Please do let us know whether it worked or not.

Best of Luck in scripting your further code.

1

solved C# Not able to return to my another class file