AKarandjeff
14 years agoContributor
Passing Variables into Keyword Tests to Identify Objects
Is it possible to pass a variable into the object string on a keyword test? The overall container frame for our application is identified by the header value of our frame, which is a combination of our application product branding, the user ID of the individual logged in and the link to the application server (highlighted below as C3C:, eak_admin and <https://chcrh.strata-group.com:18291/> respectively). I'm trying to build our test cases so they are as generic as possible as all three values can change and was thinking that we could set them as project suite level variables. That said, I do not know how to feed those variables into the object string so they properly populate and identify the object. As you can see, I would need to put the variables plus some spaces between each variable, or if there is a way to capture that frame identifier the at the beginning of a script run and then pass it along to all the other objects, that would probably be most ideal. Thanks.
Sys.Process("javaw").SwingObject("JFrame", " C3C: eak_admin <https://c3crh.strata-group.com:18291/>", 0).SwingObject("JRootPane", "", 0).SwingObject("null.layeredPane").SwingObject("null.contentPane").SwingObject("C3C", "", 0).SwingObject("SessionWorkspace", "", 0).SwingObject("InternalSessionFrameProxy", "User Details", 0).SwingObject("JRootPane", "", 0).SwingObject("null.layeredPane").SwingObject("null.contentPane").SwingObject("UserPropertySheet", "", 0).SwingObject("JPanel", "", 0).SwingObject("JPanel", "", 0).SwingObject("JPanel", "", 0).SwingObject("JPanel", "", 0).SwingObject("JButton", "OK", 0)
Sys.Process("javaw").SwingObject("JFrame", " C3C: eak_admin <https://c3crh.strata-group.com:18291/>", 0).SwingObject("JRootPane", "", 0).SwingObject("null.layeredPane").SwingObject("null.contentPane").SwingObject("C3C", "", 0).SwingObject("SessionWorkspace", "", 0).SwingObject("InternalSessionFrameProxy", "User Details", 0).SwingObject("JRootPane", "", 0).SwingObject("null.layeredPane").SwingObject("null.contentPane").SwingObject("UserPropertySheet", "", 0).SwingObject("JPanel", "", 0).SwingObject("JPanel", "", 0).SwingObject("JPanel", "", 0).SwingObject("JPanel", "", 0).SwingObject("JButton", "OK", 0)