0

I am trying to write a test that enters some text into a Froala JS editor instance, in Selenium IDE 2.9.1 (Firefox 45). I'm not able to determine any way to specify the clientX and clientY parameters to this event, which apparently Froala code is relying on to make the editor function properly.

If I use Selenium IDE's mouseOver command, there is no ability to specify these coordinates (it does not have a corresponding mouseOverAt command, as some other mouse events do). Using simply fireEvent command, with mouseover as the value, I cannot specify any parameters to that native JS event.

How can I send a mouseOver event to a particular element, with these coordinates, in Selenium IDE?

Jeff Evans
  • 1,257
  • 1
  • 15
  • 31

1 Answers1

1

As far as I know there is no good way to specify mouse coordinates using javascript. Since Selenium IDE is based on Javascript most probably it is impossible to set mouseover for specific coordinates. At least that's what I think.

But there is the way to change text in the Froala element anyway:

open    | https://www.froala.com/wysiwyg-editor
getEval | window.document.evaluate( "//*[@id='froala-editor']//div[@class='fr-element fr-view']//h1",window.document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null ).singleNodeValue.innerHTML='CROCODILE!!! ARRR!!!'

It seems pretty complex but adding a text is even more complex.

open    | https://www.froala.com/wysiwyg-editor
getEval | var addedH1 = window.document.createElement("h1"); addedH1.innerHTML = 'Added text'; window.document.evaluate( "//*[@id='froala-editor']//div[@class='fr-element fr-view']//h1/..",window.document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null ).singleNodeValue.appendChild(addedH1);

That is the only way I can suggest I hope it will help.

Antesser
  • 669
  • 4
  • 5