Using "Contains" not working for me 😩

On Linkedin, they have dynamically generated IDs that start with ember.

Recorded Macro
{
“Command”: “click”,
“Target”: “css=#ember188 > li-icon > svg > path”,
“Value”: “”,
“Targets”: [
“xpath=//*[@id=“ember188”]/li-icon/svg/path”,
“css=#ember188 > li-icon > svg > path”
],
“Description”: “”
}

Updated with Contains
{
“Command”: “click”,
“Target”: “xpath=//[contains(@id,“ember”)]",
“Value”: “”,
“Targets”: [
"xpath=//
[contains(@id,“ember”)]/li-icon/svg”,
“css=#ember88 > li-icon > svg”
],
“Description”: “”
}

Can’t get it to work. Please advise.

Hi bro
I have json file read scv from 1 to 5 can you help me to let it to read to 25?

How about using this for target: css=[id*=‘ember’] ?

you’re missing an asterisk in the xpath, xpath=//*[contains(@id,“ember”)] should work

1 Like