How to convert commands recorded in selenium IDE to Java?












21















Is there any application or simple way to convert all the commands recorded by Selenium IDE to Java (Selenium WebDriver)?
It would be a lot more easier and would save a lot of time.



Any suggestions will be appreciated.
Thanks!










share|improve this question

























  • Do you want to convert whole code to Java at a time? or, Do you like to convert individual command one by one?

    – Ripon Al Wasim
    Oct 30 '17 at 12:07
















21















Is there any application or simple way to convert all the commands recorded by Selenium IDE to Java (Selenium WebDriver)?
It would be a lot more easier and would save a lot of time.



Any suggestions will be appreciated.
Thanks!










share|improve this question

























  • Do you want to convert whole code to Java at a time? or, Do you like to convert individual command one by one?

    – Ripon Al Wasim
    Oct 30 '17 at 12:07














21












21








21


8






Is there any application or simple way to convert all the commands recorded by Selenium IDE to Java (Selenium WebDriver)?
It would be a lot more easier and would save a lot of time.



Any suggestions will be appreciated.
Thanks!










share|improve this question
















Is there any application or simple way to convert all the commands recorded by Selenium IDE to Java (Selenium WebDriver)?
It would be a lot more easier and would save a lot of time.



Any suggestions will be appreciated.
Thanks!







java selenium selenium-webdriver selenium-ide






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 30 '15 at 6:31









Ripon Al Wasim

25.7k31124150




25.7k31124150










asked Oct 14 '13 at 10:26









AmithAmith

4,81562442




4,81562442













  • Do you want to convert whole code to Java at a time? or, Do you like to convert individual command one by one?

    – Ripon Al Wasim
    Oct 30 '17 at 12:07



















  • Do you want to convert whole code to Java at a time? or, Do you like to convert individual command one by one?

    – Ripon Al Wasim
    Oct 30 '17 at 12:07

















Do you want to convert whole code to Java at a time? or, Do you like to convert individual command one by one?

– Ripon Al Wasim
Oct 30 '17 at 12:07





Do you want to convert whole code to Java at a time? or, Do you like to convert individual command one by one?

– Ripon Al Wasim
Oct 30 '17 at 12:07












4 Answers
4






active

oldest

votes


















28














In my Selenium IDE version 2.4.0 it is easy as pie:




  1. Record testcase in Selenium IDE

  2. Click File - Export Test Case As - Java / JUnit4 / WebDriver

  3. Save File as .java


And here you go! Your testcase is converted to WebDriver ;)






share|improve this answer


























  • If you want to see a good tutorial for this just take a look: elementalselenium.com/tips/6-export-from-selenium-ide

    – Jorge Rocha
    May 10 '17 at 12:58






  • 5





    Note that in the new Sel IDE, these features are not yet available. For the solution(s), see stackoverflow.com/questions/50089367/…

    – Nic Endo
    Apr 30 '18 at 11:13



















7














In my Selenium IDE version 2.4.0



Record a new test case with the help of Selenium IDE

1) Click on File a primary nav bar
2) check drop down is displayed
3) select on Export test case as
4) Check you can convert selenium test case in any language EG: Java / JUnit4 / WebDriver

Save File as .java
Your testcase is converted to WebDriver


check image enter image description here






share|improve this answer
























  • In Selenium IDE 2.9.1 Java / TestNG / WebDriver has been implemented

    – Ripon Al Wasim
    Aug 1 '17 at 10:25











  • Chrome version doesn't have it.

    – devwebcl
    Jan 17 '18 at 13:00






  • 2





    In the latest version of the IDE I don't see any of the menu options? Am I loosing my mind?

    – Daryl
    Apr 24 '18 at 15:05











  • @Daryl Don't see it either. Was able to successfully run previous version if IDE on FF 54.

    – Sergey Sokolov
    Apr 25 '18 at 9:28






  • 2





    In the new Sel IDE, these features are not yet available, see stackoverflow.com/questions/50089367/…

    – Nic Endo
    Apr 30 '18 at 11:12





















7














Update: Starting from SeleniumIDE 3.x unfortunately both functions mentioned in previous answers "Export" and "Options->Format" were removed (reason is the porting to the new WebExtensions format of Firefox and Chrome).



But a current alternative is Katalon Recorder which is available for Chrome and Firefox.



Katalon Recorder has an "Export" button and can export 3 Selenium formats, with TestNG, with JUnit and even with Thoughtworks WebDriverBackedSelenium and JUnit.



Just press "Export", choose your format, than "Copy to Clipboard" or "Save as file...".






share|improve this answer

































    3














    There are 2 ways to convert a recorded tests(HTML format) into Java code in Selenium IDE:



    1st way: To see the Java code directly in Selenium IDE




    1. Go to Options -> Options...


    2. At "Selenium IDE Options" window: Check the check box for "Enable experimental features" and click OK button


    3. Options -> Format -> Java / JUnit4 / WebDriver


    4. Click OK button from "JavaScript Application" pop up -> You will see the desired Java source code for your recorded tests


    2nd way: By exporting recorded test case(HTML format) into java file:




    1. Record your tests in HTML format by using Selenium IDE


    2. File -> Export Test Case As -> Java / JUnit4/ WebDriver


    3. Save the file (it would be saved as .java)


    4. Open the java file you saved in any text editor or IDE such as, Notepad++, Notepad, Wordpad, Eclipse, IntelliJ IDEA etc. (You can see the expected Java Selenium source code)


    There is another way to convert Selenium IDE command individually to any language. The following steps for java:




    1. Open Firefox -> Open Selenium IDE

    2. Record some steps of your test

    3. In Selenium IDE: Go to Options | Clipboard Format and select Java / TestNG / WebDriver

    4. Right click any command in Selenium IDE you recorded -> Click Copy

    5. Paste in any editor (such as NotePad, Wordpad etc. OR any IDE you are using such as eclipse, IntelliJ IDEA)

    6. The command will be pasted as Java format


    Note: In similar way you can convert individual Selenium IDE command to C#, Python and many more you want.






    share|improve this answer


























    • In Selenium IDE 2.9.1 Java / TestNG / WebDriver has been implemented.

      – Ripon Al Wasim
      Aug 2 '17 at 12:39











    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f19358183%2fhow-to-convert-commands-recorded-in-selenium-ide-to-java%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    4 Answers
    4






    active

    oldest

    votes








    4 Answers
    4






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    28














    In my Selenium IDE version 2.4.0 it is easy as pie:




    1. Record testcase in Selenium IDE

    2. Click File - Export Test Case As - Java / JUnit4 / WebDriver

    3. Save File as .java


    And here you go! Your testcase is converted to WebDriver ;)






    share|improve this answer


























    • If you want to see a good tutorial for this just take a look: elementalselenium.com/tips/6-export-from-selenium-ide

      – Jorge Rocha
      May 10 '17 at 12:58






    • 5





      Note that in the new Sel IDE, these features are not yet available. For the solution(s), see stackoverflow.com/questions/50089367/…

      – Nic Endo
      Apr 30 '18 at 11:13
















    28














    In my Selenium IDE version 2.4.0 it is easy as pie:




    1. Record testcase in Selenium IDE

    2. Click File - Export Test Case As - Java / JUnit4 / WebDriver

    3. Save File as .java


    And here you go! Your testcase is converted to WebDriver ;)






    share|improve this answer


























    • If you want to see a good tutorial for this just take a look: elementalselenium.com/tips/6-export-from-selenium-ide

      – Jorge Rocha
      May 10 '17 at 12:58






    • 5





      Note that in the new Sel IDE, these features are not yet available. For the solution(s), see stackoverflow.com/questions/50089367/…

      – Nic Endo
      Apr 30 '18 at 11:13














    28












    28








    28







    In my Selenium IDE version 2.4.0 it is easy as pie:




    1. Record testcase in Selenium IDE

    2. Click File - Export Test Case As - Java / JUnit4 / WebDriver

    3. Save File as .java


    And here you go! Your testcase is converted to WebDriver ;)






    share|improve this answer















    In my Selenium IDE version 2.4.0 it is easy as pie:




    1. Record testcase in Selenium IDE

    2. Click File - Export Test Case As - Java / JUnit4 / WebDriver

    3. Save File as .java


    And here you go! Your testcase is converted to WebDriver ;)







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Aug 1 '17 at 10:23









    Ripon Al Wasim

    25.7k31124150




    25.7k31124150










    answered Oct 14 '13 at 10:32









    Pavel JanicekPavel Janicek

    8,771104267




    8,771104267













    • If you want to see a good tutorial for this just take a look: elementalselenium.com/tips/6-export-from-selenium-ide

      – Jorge Rocha
      May 10 '17 at 12:58






    • 5





      Note that in the new Sel IDE, these features are not yet available. For the solution(s), see stackoverflow.com/questions/50089367/…

      – Nic Endo
      Apr 30 '18 at 11:13



















    • If you want to see a good tutorial for this just take a look: elementalselenium.com/tips/6-export-from-selenium-ide

      – Jorge Rocha
      May 10 '17 at 12:58






    • 5





      Note that in the new Sel IDE, these features are not yet available. For the solution(s), see stackoverflow.com/questions/50089367/…

      – Nic Endo
      Apr 30 '18 at 11:13

















    If you want to see a good tutorial for this just take a look: elementalselenium.com/tips/6-export-from-selenium-ide

    – Jorge Rocha
    May 10 '17 at 12:58





    If you want to see a good tutorial for this just take a look: elementalselenium.com/tips/6-export-from-selenium-ide

    – Jorge Rocha
    May 10 '17 at 12:58




    5




    5





    Note that in the new Sel IDE, these features are not yet available. For the solution(s), see stackoverflow.com/questions/50089367/…

    – Nic Endo
    Apr 30 '18 at 11:13





    Note that in the new Sel IDE, these features are not yet available. For the solution(s), see stackoverflow.com/questions/50089367/…

    – Nic Endo
    Apr 30 '18 at 11:13













    7














    In my Selenium IDE version 2.4.0



    Record a new test case with the help of Selenium IDE

    1) Click on File a primary nav bar
    2) check drop down is displayed
    3) select on Export test case as
    4) Check you can convert selenium test case in any language EG: Java / JUnit4 / WebDriver

    Save File as .java
    Your testcase is converted to WebDriver


    check image enter image description here






    share|improve this answer
























    • In Selenium IDE 2.9.1 Java / TestNG / WebDriver has been implemented

      – Ripon Al Wasim
      Aug 1 '17 at 10:25











    • Chrome version doesn't have it.

      – devwebcl
      Jan 17 '18 at 13:00






    • 2





      In the latest version of the IDE I don't see any of the menu options? Am I loosing my mind?

      – Daryl
      Apr 24 '18 at 15:05











    • @Daryl Don't see it either. Was able to successfully run previous version if IDE on FF 54.

      – Sergey Sokolov
      Apr 25 '18 at 9:28






    • 2





      In the new Sel IDE, these features are not yet available, see stackoverflow.com/questions/50089367/…

      – Nic Endo
      Apr 30 '18 at 11:12


















    7














    In my Selenium IDE version 2.4.0



    Record a new test case with the help of Selenium IDE

    1) Click on File a primary nav bar
    2) check drop down is displayed
    3) select on Export test case as
    4) Check you can convert selenium test case in any language EG: Java / JUnit4 / WebDriver

    Save File as .java
    Your testcase is converted to WebDriver


    check image enter image description here






    share|improve this answer
























    • In Selenium IDE 2.9.1 Java / TestNG / WebDriver has been implemented

      – Ripon Al Wasim
      Aug 1 '17 at 10:25











    • Chrome version doesn't have it.

      – devwebcl
      Jan 17 '18 at 13:00






    • 2





      In the latest version of the IDE I don't see any of the menu options? Am I loosing my mind?

      – Daryl
      Apr 24 '18 at 15:05











    • @Daryl Don't see it either. Was able to successfully run previous version if IDE on FF 54.

      – Sergey Sokolov
      Apr 25 '18 at 9:28






    • 2





      In the new Sel IDE, these features are not yet available, see stackoverflow.com/questions/50089367/…

      – Nic Endo
      Apr 30 '18 at 11:12
















    7












    7








    7







    In my Selenium IDE version 2.4.0



    Record a new test case with the help of Selenium IDE

    1) Click on File a primary nav bar
    2) check drop down is displayed
    3) select on Export test case as
    4) Check you can convert selenium test case in any language EG: Java / JUnit4 / WebDriver

    Save File as .java
    Your testcase is converted to WebDriver


    check image enter image description here






    share|improve this answer













    In my Selenium IDE version 2.4.0



    Record a new test case with the help of Selenium IDE

    1) Click on File a primary nav bar
    2) check drop down is displayed
    3) select on Export test case as
    4) Check you can convert selenium test case in any language EG: Java / JUnit4 / WebDriver

    Save File as .java
    Your testcase is converted to WebDriver


    check image enter image description here







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 28 '13 at 13:41









    Ankit jainAnkit jain

    3,24431224




    3,24431224













    • In Selenium IDE 2.9.1 Java / TestNG / WebDriver has been implemented

      – Ripon Al Wasim
      Aug 1 '17 at 10:25











    • Chrome version doesn't have it.

      – devwebcl
      Jan 17 '18 at 13:00






    • 2





      In the latest version of the IDE I don't see any of the menu options? Am I loosing my mind?

      – Daryl
      Apr 24 '18 at 15:05











    • @Daryl Don't see it either. Was able to successfully run previous version if IDE on FF 54.

      – Sergey Sokolov
      Apr 25 '18 at 9:28






    • 2





      In the new Sel IDE, these features are not yet available, see stackoverflow.com/questions/50089367/…

      – Nic Endo
      Apr 30 '18 at 11:12





















    • In Selenium IDE 2.9.1 Java / TestNG / WebDriver has been implemented

      – Ripon Al Wasim
      Aug 1 '17 at 10:25











    • Chrome version doesn't have it.

      – devwebcl
      Jan 17 '18 at 13:00






    • 2





      In the latest version of the IDE I don't see any of the menu options? Am I loosing my mind?

      – Daryl
      Apr 24 '18 at 15:05











    • @Daryl Don't see it either. Was able to successfully run previous version if IDE on FF 54.

      – Sergey Sokolov
      Apr 25 '18 at 9:28






    • 2





      In the new Sel IDE, these features are not yet available, see stackoverflow.com/questions/50089367/…

      – Nic Endo
      Apr 30 '18 at 11:12



















    In Selenium IDE 2.9.1 Java / TestNG / WebDriver has been implemented

    – Ripon Al Wasim
    Aug 1 '17 at 10:25





    In Selenium IDE 2.9.1 Java / TestNG / WebDriver has been implemented

    – Ripon Al Wasim
    Aug 1 '17 at 10:25













    Chrome version doesn't have it.

    – devwebcl
    Jan 17 '18 at 13:00





    Chrome version doesn't have it.

    – devwebcl
    Jan 17 '18 at 13:00




    2




    2





    In the latest version of the IDE I don't see any of the menu options? Am I loosing my mind?

    – Daryl
    Apr 24 '18 at 15:05





    In the latest version of the IDE I don't see any of the menu options? Am I loosing my mind?

    – Daryl
    Apr 24 '18 at 15:05













    @Daryl Don't see it either. Was able to successfully run previous version if IDE on FF 54.

    – Sergey Sokolov
    Apr 25 '18 at 9:28





    @Daryl Don't see it either. Was able to successfully run previous version if IDE on FF 54.

    – Sergey Sokolov
    Apr 25 '18 at 9:28




    2




    2





    In the new Sel IDE, these features are not yet available, see stackoverflow.com/questions/50089367/…

    – Nic Endo
    Apr 30 '18 at 11:12







    In the new Sel IDE, these features are not yet available, see stackoverflow.com/questions/50089367/…

    – Nic Endo
    Apr 30 '18 at 11:12













    7














    Update: Starting from SeleniumIDE 3.x unfortunately both functions mentioned in previous answers "Export" and "Options->Format" were removed (reason is the porting to the new WebExtensions format of Firefox and Chrome).



    But a current alternative is Katalon Recorder which is available for Chrome and Firefox.



    Katalon Recorder has an "Export" button and can export 3 Selenium formats, with TestNG, with JUnit and even with Thoughtworks WebDriverBackedSelenium and JUnit.



    Just press "Export", choose your format, than "Copy to Clipboard" or "Save as file...".






    share|improve this answer






























      7














      Update: Starting from SeleniumIDE 3.x unfortunately both functions mentioned in previous answers "Export" and "Options->Format" were removed (reason is the porting to the new WebExtensions format of Firefox and Chrome).



      But a current alternative is Katalon Recorder which is available for Chrome and Firefox.



      Katalon Recorder has an "Export" button and can export 3 Selenium formats, with TestNG, with JUnit and even with Thoughtworks WebDriverBackedSelenium and JUnit.



      Just press "Export", choose your format, than "Copy to Clipboard" or "Save as file...".






      share|improve this answer




























        7












        7








        7







        Update: Starting from SeleniumIDE 3.x unfortunately both functions mentioned in previous answers "Export" and "Options->Format" were removed (reason is the porting to the new WebExtensions format of Firefox and Chrome).



        But a current alternative is Katalon Recorder which is available for Chrome and Firefox.



        Katalon Recorder has an "Export" button and can export 3 Selenium formats, with TestNG, with JUnit and even with Thoughtworks WebDriverBackedSelenium and JUnit.



        Just press "Export", choose your format, than "Copy to Clipboard" or "Save as file...".






        share|improve this answer















        Update: Starting from SeleniumIDE 3.x unfortunately both functions mentioned in previous answers "Export" and "Options->Format" were removed (reason is the porting to the new WebExtensions format of Firefox and Chrome).



        But a current alternative is Katalon Recorder which is available for Chrome and Firefox.



        Katalon Recorder has an "Export" button and can export 3 Selenium formats, with TestNG, with JUnit and even with Thoughtworks WebDriverBackedSelenium and JUnit.



        Just press "Export", choose your format, than "Copy to Clipboard" or "Save as file...".







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 30 '18 at 10:20

























        answered Apr 30 '18 at 10:07









        Harry G.Harry G.

        9116




        9116























            3














            There are 2 ways to convert a recorded tests(HTML format) into Java code in Selenium IDE:



            1st way: To see the Java code directly in Selenium IDE




            1. Go to Options -> Options...


            2. At "Selenium IDE Options" window: Check the check box for "Enable experimental features" and click OK button


            3. Options -> Format -> Java / JUnit4 / WebDriver


            4. Click OK button from "JavaScript Application" pop up -> You will see the desired Java source code for your recorded tests


            2nd way: By exporting recorded test case(HTML format) into java file:




            1. Record your tests in HTML format by using Selenium IDE


            2. File -> Export Test Case As -> Java / JUnit4/ WebDriver


            3. Save the file (it would be saved as .java)


            4. Open the java file you saved in any text editor or IDE such as, Notepad++, Notepad, Wordpad, Eclipse, IntelliJ IDEA etc. (You can see the expected Java Selenium source code)


            There is another way to convert Selenium IDE command individually to any language. The following steps for java:




            1. Open Firefox -> Open Selenium IDE

            2. Record some steps of your test

            3. In Selenium IDE: Go to Options | Clipboard Format and select Java / TestNG / WebDriver

            4. Right click any command in Selenium IDE you recorded -> Click Copy

            5. Paste in any editor (such as NotePad, Wordpad etc. OR any IDE you are using such as eclipse, IntelliJ IDEA)

            6. The command will be pasted as Java format


            Note: In similar way you can convert individual Selenium IDE command to C#, Python and many more you want.






            share|improve this answer


























            • In Selenium IDE 2.9.1 Java / TestNG / WebDriver has been implemented.

              – Ripon Al Wasim
              Aug 2 '17 at 12:39
















            3














            There are 2 ways to convert a recorded tests(HTML format) into Java code in Selenium IDE:



            1st way: To see the Java code directly in Selenium IDE




            1. Go to Options -> Options...


            2. At "Selenium IDE Options" window: Check the check box for "Enable experimental features" and click OK button


            3. Options -> Format -> Java / JUnit4 / WebDriver


            4. Click OK button from "JavaScript Application" pop up -> You will see the desired Java source code for your recorded tests


            2nd way: By exporting recorded test case(HTML format) into java file:




            1. Record your tests in HTML format by using Selenium IDE


            2. File -> Export Test Case As -> Java / JUnit4/ WebDriver


            3. Save the file (it would be saved as .java)


            4. Open the java file you saved in any text editor or IDE such as, Notepad++, Notepad, Wordpad, Eclipse, IntelliJ IDEA etc. (You can see the expected Java Selenium source code)


            There is another way to convert Selenium IDE command individually to any language. The following steps for java:




            1. Open Firefox -> Open Selenium IDE

            2. Record some steps of your test

            3. In Selenium IDE: Go to Options | Clipboard Format and select Java / TestNG / WebDriver

            4. Right click any command in Selenium IDE you recorded -> Click Copy

            5. Paste in any editor (such as NotePad, Wordpad etc. OR any IDE you are using such as eclipse, IntelliJ IDEA)

            6. The command will be pasted as Java format


            Note: In similar way you can convert individual Selenium IDE command to C#, Python and many more you want.






            share|improve this answer


























            • In Selenium IDE 2.9.1 Java / TestNG / WebDriver has been implemented.

              – Ripon Al Wasim
              Aug 2 '17 at 12:39














            3












            3








            3







            There are 2 ways to convert a recorded tests(HTML format) into Java code in Selenium IDE:



            1st way: To see the Java code directly in Selenium IDE




            1. Go to Options -> Options...


            2. At "Selenium IDE Options" window: Check the check box for "Enable experimental features" and click OK button


            3. Options -> Format -> Java / JUnit4 / WebDriver


            4. Click OK button from "JavaScript Application" pop up -> You will see the desired Java source code for your recorded tests


            2nd way: By exporting recorded test case(HTML format) into java file:




            1. Record your tests in HTML format by using Selenium IDE


            2. File -> Export Test Case As -> Java / JUnit4/ WebDriver


            3. Save the file (it would be saved as .java)


            4. Open the java file you saved in any text editor or IDE such as, Notepad++, Notepad, Wordpad, Eclipse, IntelliJ IDEA etc. (You can see the expected Java Selenium source code)


            There is another way to convert Selenium IDE command individually to any language. The following steps for java:




            1. Open Firefox -> Open Selenium IDE

            2. Record some steps of your test

            3. In Selenium IDE: Go to Options | Clipboard Format and select Java / TestNG / WebDriver

            4. Right click any command in Selenium IDE you recorded -> Click Copy

            5. Paste in any editor (such as NotePad, Wordpad etc. OR any IDE you are using such as eclipse, IntelliJ IDEA)

            6. The command will be pasted as Java format


            Note: In similar way you can convert individual Selenium IDE command to C#, Python and many more you want.






            share|improve this answer















            There are 2 ways to convert a recorded tests(HTML format) into Java code in Selenium IDE:



            1st way: To see the Java code directly in Selenium IDE




            1. Go to Options -> Options...


            2. At "Selenium IDE Options" window: Check the check box for "Enable experimental features" and click OK button


            3. Options -> Format -> Java / JUnit4 / WebDriver


            4. Click OK button from "JavaScript Application" pop up -> You will see the desired Java source code for your recorded tests


            2nd way: By exporting recorded test case(HTML format) into java file:




            1. Record your tests in HTML format by using Selenium IDE


            2. File -> Export Test Case As -> Java / JUnit4/ WebDriver


            3. Save the file (it would be saved as .java)


            4. Open the java file you saved in any text editor or IDE such as, Notepad++, Notepad, Wordpad, Eclipse, IntelliJ IDEA etc. (You can see the expected Java Selenium source code)


            There is another way to convert Selenium IDE command individually to any language. The following steps for java:




            1. Open Firefox -> Open Selenium IDE

            2. Record some steps of your test

            3. In Selenium IDE: Go to Options | Clipboard Format and select Java / TestNG / WebDriver

            4. Right click any command in Selenium IDE you recorded -> Click Copy

            5. Paste in any editor (such as NotePad, Wordpad etc. OR any IDE you are using such as eclipse, IntelliJ IDEA)

            6. The command will be pasted as Java format


            Note: In similar way you can convert individual Selenium IDE command to C#, Python and many more you want.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 9 '17 at 10:39

























            answered Jun 30 '15 at 6:38









            Ripon Al WasimRipon Al Wasim

            25.7k31124150




            25.7k31124150













            • In Selenium IDE 2.9.1 Java / TestNG / WebDriver has been implemented.

              – Ripon Al Wasim
              Aug 2 '17 at 12:39



















            • In Selenium IDE 2.9.1 Java / TestNG / WebDriver has been implemented.

              – Ripon Al Wasim
              Aug 2 '17 at 12:39

















            In Selenium IDE 2.9.1 Java / TestNG / WebDriver has been implemented.

            – Ripon Al Wasim
            Aug 2 '17 at 12:39





            In Selenium IDE 2.9.1 Java / TestNG / WebDriver has been implemented.

            – Ripon Al Wasim
            Aug 2 '17 at 12:39


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f19358183%2fhow-to-convert-commands-recorded-in-selenium-ide-to-java%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            404 Error Contact Form 7 ajax form submitting

            How to know if a Active Directory user can login interactively

            TypeError: fit_transform() missing 1 required positional argument: 'X'