Trying to figure out how to click into the text box without using XClick, is that possible?

Hi,

I’m trying to figure out how to simulate a click into the text box and then paste the text into it. I can find the element when I click “Find” and it should click but it simply does not get clicked and any “sendKeys” would not work.

I was thinking maybe I could try to execute JavaScript using executeScript something like this: ("arguments[0].click();",s)

In selenium (python) I could do this:

s = driver.find_element(By.XPATH, "xpath")
driver.execute_script("arguments[0].click();",s)

But I just can’t figure out how to do this. I know I could use XClick to simulate actual mouse click which takes over the mouse but that’s not ideal because I would like to run several scripts back to back on multiple browser windows and it would clash with one another. Any ideas? Thanks!

{
  "Name": "Send a message TEST",
  "CreationDate": "2023-4-3",
  "Commands": [
    {
      "Command": "click",
      "Target": "//*[@id=\"main\"]/div/div[1]/main/div[3]/div/div[1]/div/div/textarea[1]",
      "Value": "",
      "Targets": [
        "xpath=//*[@id=\"main\"]/div/div/aside/div/div[3]/div/div/section[2]/div/div/div/div[4]",
        "xpath=//div[4]",
        "css=#main > div > div.page__layout > aside.page__sidebar > div > div.sidebar__content.sidebar__content--main > div > div > section.contact-tabs__section.contact-tabs__section--conversations > div > div > div.scroll__inner > div:nth-child(4)"
      ],
      "Description": "click to open chat box"
    },
    {
      "Command": "sendKeys",
      "Target": "hru?",
      "Value": "",
      "Description": "send text"
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"main\"]/div/div/main/div[3]/div/button/span/span",
      "Value": "",
      "Description": "send button click"
    }
  ]
}

It is necessary to be able to see the page, there are cases where a button cannot be clicked with normal web commands.
Try with sendkeys Enter and Space and ClickAt command or find alternative xpath with external tool and use Click again

big facepalm incoming but for this specific usecase I just used type with the correct xpath and it worked! I can’t believe it was that simple lol. Case closed, thanks a lot!