Package net.sf.sahi.client

Examples of net.sf.sahi.client.Browser


    public GuiPerfTestCase(String name) {
        super(name);
    }

    public void testLoadResourceTree() {
        Browser browser = GuiPerfTestSuite.getBrowser();

        browser.link("Inventory").click();
        browser.cell("Platforms").click();
        browser.div("Linux Operating System").under(browser.cell("Description")).doubleClick();
        // check that tree has been drawn
        assertTrue(browser.table("treeCellSelected").isVisible());
    }
View Full Code Here


        String firefoxProfile = "sahi" + profileIndex;

        String browserOptions = "-profile " + SAHI_USER_DATA + "/browser/ff/profiles/" + firefoxProfile
                + " -no-remote";
        System.out.println("Browser options: " + browserOptions);
        Browser browser = new Browser(browserPath, browserProcessName, browserOptions);
        try {
            browser.open();
        } catch (Exception e) {
            throw new RuntimeException("Failed to connect to Sahi proxy - make sure Sahi dashboard is running - cause: "
                    + e);
        }
View Full Code Here

        SahiUtility.initSahi();
    }

    @Override
    public void run(TestResult result) {
        Browser browser = BROWSERS.get();
        if (browser == null) {
            // Start at 1, so 0 is reserved for manual recording and testing.
            int browserIndex = this.threadCount.incrementAndGet();
            System.out.println("browserIndex=" + browserIndex);
            browser = SahiUtility.createBrowser(browserIndex);
            BROWSERS.set(browser);

            login(browser);
        }

        super.run(result);

        logout(browser);
        browser.close();
    }
View Full Code Here

  public void setUp(){
    String sahiBase = "../"; // where Sahi is installed or unzipped
    userDataDirectory = "myuserdata";
    Configuration.initJava(sahiBase, userDataDirectory); // Sets up configuration for proxy. Sets Controller to java mode.
   
    browser = new Browser("firefox")
    browser.open();
 
View Full Code Here

TOP

Related Classes of net.sf.sahi.client.Browser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.