Use of Javascript instead of Groovy(code)

Hi,

Can anyone please help me on:

  1. how to use JavaScript instead of Groovy.

I tried to change the script language from Groovy to JavaScript. and run the “window.open(“http://www.google.com”)” or alert(“hi”).
But it gives a reference error exception.
I tried to change xmlns but that also didn’t work.

Please find below script that I tried.

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://web-harvest.sourceforge.net/schema/1.0/config" scriptlang="javascript">
    <robotics-flow>
        <robot driver="internet explorer" close-on-completion="true" start-in-private="true">
            <capability name="SEARCH_ALL_WINDOWS" value="true" />
            <script><![CDATA[
                window.open("http://www.google.com")
            ]]></script>
        </robot>
    </robotics-flow>
    <export include-original-data="true"/>
</config>

Please let me know If anyone has a solution for the above.
Thanks

Hi @Atul you cannot use Javascript to create bot tasks. The Studio supports coding in Groovy and Java.

Hi @ashapkina, So is that also means we can’t even use JavaScript to Custom Script action.

No, for Custom Action we recommend to use Groovy.

In the bot task, you can actually execute Java script code through JavascriptExecutor.

You can find documentation on JavascriptExecutor in WorkFusion Studio: Help - Help Contents.