NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand C# adapter - Constructor not showing input variables

Solved!
Go to solution

Using TestStand to test web pages using Selenium.  Tests are built using a Page Object model. The constructor call is:   "public LoginPage(IWebDriver driver) : base(driver)"

TestStand: Step Settings for Action.  Module: Assembly :

Root class is PageObjects.LoginPage and the .Net Invocation is LoginPage()  there are no arguments to be passed to the constructor.  I need to pass the IWebDriver to the constructor which passes the IWebDriver to the base constructor to initialize the driver instance in base & inherited classes. 

Why isn't the parameter list for the constructor of the LoginPage object showing the parameter list? Is it something I'm doing/not doing?  Test run in NUnit test.

 

0 Kudos
Message 1 of 13
(2,721 Views)

Hi Ran_Aground

 

I saw this post and it was without reply. I am wondering if this issue persists. 

 

I would like to also ask for further context on this error, maybe some screenshots will help other users and myself to have a clear idea of wht is happening.

 

I appreciate your help!

 

Message 2 of 13
(2,641 Views)
Solution
Accepted by topic author Ran_Aground

Problem is resolved with small code change and a new build.  Operator error!

Message 3 of 13
(2,632 Views)

Am trying to load the constructor in the teststand using API in C#. Am not able to get the parameters of the function in the .net call. Also i donno how to "Use EXisting object".

0 Kudos
Message 4 of 13
(157 Views)

Provided you have loaded the correct assembly... 

 

If the expected Constructor Parameters are not shown, you have most probably chosen the wrong constructor

 

When the object os created by the constructor, you stor it to a (local) variable of type Object. This variable can afterwards be used as the Existing Object to access object methods or properties.

Message 5 of 13
(148 Views)

Am able to use existing object but then how do i call the method. When am trying to do so m getting method without its parameters.

SanaRif_0-1755840432643.pngSanaRif_1-1755840459038.png

Member name is giving me the method but here the release function has an integer parameter which isnt getting reflected here in teststand

0 Kudos
Message 6 of 13
(132 Views)

I can't find any Release Method defined in the text code screenshot, you have posted....

0 Kudos
Message 7 of 13
(120 Views)

Am loading a dll which has release method and am trying to call that in teststand. So you see in the attached screenshot Release() is in red. How do i call the method programmatically in testsand using API.

Also am getting metadatatoken as -1

SanaRif_0-1755853631309.png

 

0 Kudos
Message 8 of 13
(113 Views)

Basically the code is to create sequence programatically

0 Kudos
Message 9 of 13
(97 Views)

So you are callling .net assembly from TestStand to work with the TestStand API, understood.

 

My point is: 

You are referencing an Object of Type TestApping.CurrentTest to call its' Release Method.

IMHO, so far none of the screenshots have shown, that your class definition actually has the Release method.

 

If it has and it doesn't show up in TestStand as expected, make sure, you have loaded the correct version of your assembly from the correct path.

 

0 Kudos
Message 10 of 13
(83 Views)