How to get site to recognize you entered data in a textbox

I’m trying to automate entering information and going through steps to download information on semrush.com. I recorded the steps. When I play them back, the site is telling me to enter information in the text boxes although there is already information there.

After I run the macro, I go to where the macro stopped on the page. I put the cursor in the text box and hit enter and the site recognizes the information.

How can I get the macro to do the same? I’ve added {KEY_ENTER} after the Type commands, when the data gets entered, but it didn’t help. I thought XTYPE was a more advanced form of the type command, but it does not take values.

Thanks

I can’t figure out what you need to do, if some commands don’t work use other better xpaths it doesn’t seem difficult to automate the site you’ve indicated.

Add image to show the automation you want do please.

I’ve uploaded a screenshot.

Below is the code I am running:

{
“Name”: “semrush”,
“CreationDate”: “2021-1-12”,
“Commands”: [
{
“Command”: “open”,
“Target”: “https://www.semrush.com/dashboard/”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “xpath=/html/body/div/div[3]/div/div/nav/div/div[3]/div/div/div/div[5]/a/span”,
“Value”: “”,
“Targets”: [
“xpath=/html/body/div/div[3]/div/div/nav/div/div[3]/div/div/div/div[5]/a/span”,
“xpath=//div[5]/a/span”,
“css=body > div.srf-layout > div.srf-layout__sidebar > div > div > nav > div.srf-report-sidebar-main.js-sidebar-main > div.srf-report-sidebar-all-tools.js-sidebar-main-all-tools > div:nth-child(2) > div > div > div:nth-child(6) > a > span”
]
},
{
“Command”: “pause”,
“Target”: “5000”,
“Value”: “”
},
{
“Command”: “type”,
“Target”: “xpath=//[@id=“keyword-gap-app”]/div/div/div[3]/div/div[2]/div/div/div/div/input",
“Value”: “welcomehisheart.com
},
{
“Command”: “XType”,
“Target”: “{KEY_ENTER}", "Value": "" }, { "Command": "click", "Target": "xpath=//*[@id=\"keyword-gap-app\"]/div/div/div[3]/div/div[2]/div/div[2]/div/div/input", "Value": "", "Targets": [ "xpath=//*[@id=\"keyword-gap-app\"]/div/div/div[3]/div/div[2]/div/div[2]/div/div/input", "xpath=//input[@value='' and @type='text']", "xpath=//div/div[2]/div/div/input", "css=#keyword-gap-app > div > div > div.landing.module__domainsCnt___2zrkP > div > div.style.module__domainsLine___mvWek > div.style.module__optionsLine___2VEDj > div:nth-child(2) > div > div > input" ] }, { "Command": "type", "Target": "xpath=//*[@id=\"keyword-gap-app\"]/div/div/div[3]/div/div[2]/div/div[2]/div/div/input", "Value": "catholic.com" }, { "Command": "XType", "Target": "{KEY_ENTER}”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//
[@id=“keyword-gap-app”]/div/div/div[2]”,
“Value”: “”,
“Targets”: [
“xpath=//[@id=“keyword-gap-app”]/div/div/div[2]",
“xpath=//main/div/div/div/div[2]”,
“css=#keyword-gap-app > div > div > div.landing.module__landingCnt___5Ui4I”
]
},
{
“Command”: “click”,
“Target”: "xpath=//
[@id=“keyword-gap-app”]/div/div/div[3]/div/div[2]/div[2]/button/span/span”,
“Value”: “”,
“Targets”: [
“xpath=//[@id=“keyword-gap-app”]/div/div/div[3]/div/div[2]/div[2]/button/span/span",
“xpath=//button/span/span”,
“css=#keyword-gap-app > div > div > div.landing.module__domainsCnt___2zrkP > div > div.style.module__domainsLine___mvWek > div.style.module__buttons___2zj2g > button > span > span”
]
},
{
“Command”: “pause”,
“Target”: “10000”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//
[@id=“keyword-gap-app”]/div/div”,
“Value”: “”,
“Targets”: [
“xpath=//[@id=“keyword-gap-app”]/div/div[3]/div[6]/div/div/div[7]/button/span[2]/span/span",
“xpath=//div[7]/button/span[2]/span/span”,
“css=#keyword-gap-app > div > div.report.module__reportCnt___1cf7L > div.report.module__tableOptions___2lIaM > div.keyword_types_pills.module__keywordTypesLine___5sUBk > div > div:nth-child(7) > button > span.___SAddon_11lvw-red-team > span > span”
]
},
{
“Command”: “XType”,
“Target”: “{KEY_ENTER}", "Value": "" }, { "Command": "click", "Target": "xpath=//*[@id=\"keyword-gap-app\"]/div/div/div[3]/div/div[2]/div/div/div/div/input", "Value": "", "Targets": [ "xpath=//*[@id=\"keyword-gap-app\"]/div/div[3]/div[6]/div/div/div[7]/button/span[2]/span/span", "xpath=//div[7]/button/span[2]/span/span", "css=#keyword-gap-app > div > div.report.module__reportCnt___1cf7L > div.report.module__tableOptions___2lIaM > div.keyword_types_pills.module__keywordTypesLine___5sUBk > div > div:nth-child(7) > button > span.___SAddon_11lvw-red-team > span > span" ] }, { "Command": "XType", "Target": "{KEY_ENTER}”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//
[@id=“keyword-gap-app”]/div/div[3]/div[6]/div/div/div[7]/button/span[2]/span/span”,
“Value”: “”,
“Targets”: [
“xpath=//[@id=“keyword-gap-app”]/div/div[3]/div[6]/div/div/div[7]/button/span[2]/span/span",
“xpath=//div[7]/button/span[2]/span/span”,
“css=#keyword-gap-app > div > div.report.module__reportCnt___1cf7L > div.report.module__tableOptions___2lIaM > div.keyword_types_pills.module__keywordTypesLine___5sUBk > div > div:nth-child(7) > button > span.___SAddon_11lvw-red-team > span > span”
]
},
{
“Command”: “pause”,
“Target”: “5000”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//
[@id=“keyword-gap-app”]/div/div[3]/div[6]/div[2]/div[2]/div/button/span/span[2]”,
“Value”: “”,
“Targets”: [
“xpath=//[@id=“keyword-gap-app”]/div/div[3]/div[6]/div[2]/div[2]/div/button/span/span[2]",
“xpath=//div[2]/div/button/span/span[2]”,
“css=#keyword-gap-app > div > div.report.module__reportCnt___1cf7L > div.report.module__tableOptions___2lIaM > div.report.module__exportOptions___2DnmS > div:nth-child(2) > div > button > span > span.___SText_1rl7b-red-team.__size_1rl7b-red-team.__size_m_1rl7b-red-team”
]
},
{
“Command”: “click”,
“Target”: "xpath=//
[@id=“3634”]/div/div[3]/div[2]/div[2]/button/span/span”,
“Value”: “”,
“Targets”: [
“xpath=//*[@id=“3634”]/div/div[3]/div[2]/div[2]/button/span/span”,
“xpath=//div[3]/div[2]/div[2]/button/span/span”,
“css=#3634 > div > div.export_popup.module__buttons___3YV7I > div.horizontal_spacer.module__spacer___392Xe > div:nth-child(2) > button > span > span”
]
},
{
“Command”: “click”,
“Target”: “xpath=/html/body/a”,
“Value”: “”,
“Targets”: [
“xpath=/html/body/a”,
“xpath=//body/a”,
“css=body > a”
]
}
]
}

The page require login i can not see it, sorry

Well, you could try a free 7-day trial and cancel before the 7th day. That is what I am doing.

Thanks,

I’m so close. I got to the last step, where I download the results.
I was able to get it to work once.

But most of the time I get an error: timeout reached when looking for element ‘xpath=/html/body/div[14]/div/div[3]/div[2]/div[2]/button/span’

I tried assertElementPresent but that also gave me an error.

Any assistance would be appreciated.