"Run This Routine" Greyed out in script mode
Hey All,
Hello. I have a block of code I want to reuse multiple times with a parameter on the "Test Items" page.
It's for navigating to specific buttons on a nav bar.
When I run the test through the Test Items page (via right click + run Focused Test item) it works just as I expect, which is great...I can select the param as a string and put a value in and its good to go.
but when Im editing in the script mode editor, I cannot do the "run this routine" option, and is making me think there is an error in the code somewhere? Its greyed out and apparently is suggesting to click Code Completion, which Im not sure what it's trying to do there. Any thoughts would be very appreaciated!
I've isolated a small chunk and thought if I made it this basic it would work, but no - it is still greyed out.
function teleport(NEWPARAM) {
Indicator.PushText("Navigating to Blade...");
let navigate = Aliases.browser.page.nav
let navbar = Aliases.browser.page.header
//Clear any open blades
Aliases.browser.page.header.button3.HoverMouse();
delay(200)
Aliases.browser.page.header.button3.Click();
delay(200)
Log.Message(NEWPARAM);
}
The routine has a parameter. You can't run a parameterized routine using the right-click context menu because you need to have some way of indicating the value of the parameter. Work-around: create a "harness" function that, all it does is call your routine with the proper parameter value.