Automate search and click

{
“Name”: “next”,
“CreationDate”: “2024-3-30”,
“Commands”: [
{
“Command”: “open”,
“Target”: “https://www.yourdomain.com”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “name=psd”,
“Value”: “”,
“Targets”: [
“name=psd”,
“xpath=//*[@id="j_page_header"]/div/div/div/div/div[2]/div[3]/div/input”,
“xpath=//input[@name=‘psd’]”,
“xpath=//div[3]/div/input”,
“css=#j_page_header > div.m-top-wrapper > div > div.m-logo-bar > div.m-login-bar > div.m-opt > div.m-psd-wrapper > div.m-psd > input”
],
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=/html/body/div/div[2]/div[2]/div/div[2]/div/div[2]/div/div[2]/div/div[2]/div/div”,
“Value”: “”,
“Targets”: [
“xpath=/html/body/div/div[2]/div[2]/div/div[2]/div/div[2]/div/div[2]/div/div[2]/div/div”,
“xpath=//div[2]/div/div[2]/div/div[2]/div/div[2]/div/div[2]/div/div”,
“css=body > div.s-page > div.m-main.m-layout-main > div.m-table.m-main-bottom > div > div.m-table-cell.m-main-mid > div > div.m-eventDetail > div > div.m-detail-wrapper > div:nth-child(2) > div:nth-child(2) > div > div:nth-child(1)”
],
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=/html/body/div/div[2]/div[2]/div/div[2]/div/div[2]/div/div[2]/div[10]/div[2]/div/div”,
“Value”: “”,
“Targets”: [
“xpath=/html/body/div/div[2]/div[2]/div/div[2]/div/div[2]/div/div[2]/div[10]/div[2]/div/div”,
“xpath=//div[10]/div[2]/div/div”,
“css=body > div.s-page > div.m-main.m-layout-main > div.m-table.m-main-bottom > div > div.m-table-cell.m-main-mid > div > div.m-eventDetail > div > div.m-detail-wrapper > div:nth-child(11) > div:nth-child(2) > div > div:nth-child(1)”
],
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=/html/body/div/div[2]/div[2]/div/div[2]/div/div[2]/div/div[2]/div[18]/div[2]/div/div[2]”,
“Value”: “”,
“Targets”: [
“xpath=/html/body/div/div[2]/div[2]/div/div[2]/div/div[2]/div/div[2]/div[18]/div[2]/div/div[2]”,
“xpath=//div[18]/div[2]/div/div[2]”,
“css=body > div.s-page > div.m-main.m-layout-main > div.m-table.m-main-bottom > div > div.m-table-cell.m-main-mid > div > div.m-eventDetail > div > div.m-detail-wrapper > div:nth-child(19) > div:nth-child(2) > div > div:nth-child(2)”
],
“Description”: “”
}
]
}

I want to use the search function instead of xclick.

I want to search for a text on the page or source, then click on the button.

How do i do that?

Did you try sourceSearch yet?

For more options see this text search post.

Thanks for the text search because it lead me to xtype which handled the search correctly. Sourcesearch didn’t work because the text is not in the source code.

How do i handle the x,y? i am currently using Xclicktextrelative and it works but i can’t add space because the whole word is “long island - 3000” and i want it to click on it. There are several variations of the text but if i delete out other variations and test just “Long” it works.

So how do i run xclicktextrelative on a word with spaces like “Long Island - 3000”?

I am using chrome on windows.

Just to clarify. You need to find exactly “Long Island - 3000”. Searching for “Long” or “Island” finds the wrong area?