Javascript functions

How do I pass multiple parameters to a JavaScript function?

Is that a UI.Vision question? If so, do you mean JS inside ExecuteScript or JS inside a web page?

Yes inside of the ExecuteScript function.

You can have one or more Selenium IDE variables inside “execute script”.

Example:

  • store | 30 | i
  • execute script | return Number (${i}) + 5; | result
  • echo | result => result is 35

Thank you this is very helpful. My goal is to execute a JavaScript drag and drop function. I need to drop a file path onto a web page drop zone to initiate the file upload.

To automate drag & drop you can use XClick and XMove: How to click and drag in RPA

Sometimes you can bypass drag and drop using simple click in the element, need to find a good xpath inside the element.

Usually there is a simple solution to not use drag and drop.

Example for some button slides i do not use drag and drop, I search xpath inside and with a simple click i activate the button slide.

2 Likes

Thanks everyone for your help. I was able to do exactly what newuserkantu suggested and the drag and drop file upload worked just fine.

2 Likes

2 posts were split to a new topic: CSV question question