0

I'm trying to add some custom command using my homemade plugin like the documentation say we can: https://www.selenium.dev/selenium-ide/docs/en/plugins/plugins-getting-started

It is working fine, I am registering my plugin with my command like that

const registerPayload = {
        uri: "/register",
        verb: "post",
        payload: {
          name: "InterceptPOC",
          version: "1.0",
          commands: [
            {
              id: "threeJsCommand",
              name: "ThreeJS Action"
            } 
            ]
        }
      };

      chrome.runtime.sendMessage("mooikfkahbdckldjjndioackbalphokd", registerPayload);

And I can see my command on my IDE :

enter image description here

But when I try to do a POST when I record, with

const requestPayload = {
        uri: "/record/command",
        verb: "post",
        command: "threeJsCommand",
        target: "test"
      }

      chrome.runtime.sendMessage("mooikfkahbdckldjjndioackbalphokd", requestPayload);

And all I can see is an empty commented command in my record : enter image description here

I tried to add a "click" command and I had the same behaviour : empty commented line, not the click command.

Am I doing something wrong ? I am having a lot of trouble to find exemple on the internet.

Thanks

1 Answer 1

0

If someone else has the issue, please not that the documentation was wrong at the 01/08/2023.

Todd Tarsi here helped me with a correct snippet : https://github.com/SeleniumHQ/selenium-ide/issues/1683

const writeSucceeded = await browser.runtime.sendMessage(seleniumIDEExtension, {
  uri: "/record/command",
  verb: "post",
  payload: {
    command: "writeToDraftJS",
    target: 'css=.asdf',
    value: 'asdf',
  },
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.