1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need somebody savy with selenium java

Discussion in 'Hire a Freelancer' started by FargoNoob, Jan 31, 2015.

  1. FargoNoob

    FargoNoob Registered Member

    Joined:
    Sep 29, 2014
    Messages:
    56
    Likes Received:
    10
    So I'm trying to make my junit test into an executable so I can execute it with a .bat file. Does anybody know how to do this?
    The way I've been trying to use is turning it into an executable .jar file. If there is a better way let me know.

    How do I generate a main method for this script so I can export it as an executable .jar?



    import com.thoughtworks.selenium.*;
    import org.junit.After;
    import org.junit.Before;
    import org.junit.Test;
    import static org.junit.Assert.*;
    import java.util.regex.Pattern;


    public class Hello extends SeleneseTestCase {
    private Selenium selenium;


    @Before
    public void setUp() throws Exception {
    selenium = new DefaultSelenium("localhost", 4444, "*firefox C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe",
    ----------------------------
    Please feel free to add me on skyep - ScytheMarketing
    I'm willing to make a donation to anybody willing to help me.
     
  2. mnunes532

    mnunes532 Supreme Member

    Joined:
    Jan 21, 2014
    Messages:
    1,433
    Likes Received:
    465
    Gender:
    Male
    Location:
    Portugal
    What do you really want? To run your jar file automatically inside the batch script?
     
    • Thanks Thanks x 1
  3. FargoNoob

    FargoNoob Registered Member

    Joined:
    Sep 29, 2014
    Messages:
    56
    Likes Received:
    10
    Yes, to be able to execute it with a .bat and close it with a bat. Pretty much anyway I can run it automatically outside of eclipse with cmd prompt.