Pass variable in selector

@Allan_Zimmermann @kowts
i have this selector
[
{
“Selector”: “NM”,
“browser”: “chrome”,
“frame”: “-1”,
“url”: “https://obi.serviceassistant.com/1167/Login
},
{
“xpath”: “//div[@id="main-login-container"]/div[3]/div”
}
]

now i want to pass the url dynamic now static. is this possible. If possible then how can i do it

URL is only used to “fint the tab” in case you have multiple tab’s open.
If you need to open a url, you need to use “open url” activity
open url allows you to use a variable

and to answer your question, you can use {{variablename}} inside a selector to dynamicly add a variable, but then highlight will stop working.

“[
{
“Selector”: “NM”,
“browser”: “chrome”,
“frame”: null,
“url”: {{URL}}
},
{
“xpath”: “//input[@id="QuickSearch"]”
}
]”

We can do this. Right

@Allan_Zimmermann

The following errors were encountered while processing the workflow tree:

‘DynamicActivity’: The private implementation of activity ‘1: DynamicActivity’ has the following validation error: Compiler error(s) encountered processing expression “”[
{
“Selector”: “NM”,
“browser”: “chrome”,
“frame”: “”,
“url”: {{SearchURL}}
},
{
“xpath”: “//input[@id="QuickSearch"]”
}
]“”.
String constants must end with a double quote.

getting this error.

your missing “” around it …

“[
{
“Selector”: “NM”,
“browser”: “chrome”,
“frame”: “”,
“url”: {{“SearchURL”}}
},
{
“xpath”: “//input[@id="QuickSearch"]”
}
]”
you mean like this

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.