Keyword Tests: create an object by concatenating variables or parameters
I have the path below:
Sys.Process("InteleRIS").WinFormsObject("mdiRIS").WinFormsObject("MdiClient", "").WinFormsObject("frmPatientMain").WinFormsObject("tabPages").WinFormsObject("UltraTabPageControl23").WinFormsObject("pnlApptRequests")
Now, this is used within a small keyword test which is called from other test cases.
The last part of this path (the bolded one) should be a parameter which I am throwing in when I call this test.
So basically because this value is dynamic, I need to create an object by concatenating the path with a parameter in the last part of it and then use this object to do different actions on it, like IsVisibleOnScreen.
I have tried something like next (but it does not work, tried with Variables and Parameters as well):
Sys.Process("InteleRIS").WinFormsObject("mdiRIS").WinFormsObject("MdiClient", "").WinFormsObject("frmPatientMain").WinFormsObject("tabPages").WinFormsObject("UltraTabPageControl23").WinFormsObject(" + KeywordTests.PatEdit_CheckCorrectTabIsDisplayed.Parameters.ExpectedPatientEditTabName + ")
Please suggest.
Note: I need this as a keyword test (but I don't mind a VB script example as well)
Thank you.
Not quite... I would change the settings on "Call Object Method".
For PropNames, I'd use WinFormsControlName
For PropValues, you can set the type to a "Test Parameter" and then grab your parameter directly. See screenshot: