Package org.openqa.selenium.remote

Examples of org.openqa.selenium.remote.DesiredCapabilities


                .getDesiredCapabilities()));
    }

    @Override
    protected DesiredCapabilities getDesiredCapabilities() {
        DesiredCapabilities cap = new DesiredCapabilities(
                super.getDesiredCapabilities());
        cap.setCapability("requireWindowFocus", true);
        return cap;
    }
View Full Code Here


     * @param testName
     * @return the reference file name to use for the given browser, as
     *         described by {@literal capabilities}, and identifier
     */
    private File getScreenshotReferenceFile(String identifier) {
        DesiredCapabilities capabilities = getDesiredCapabilities();

        String originalName = getScreenshotReferenceName(identifier);
        File exactVersionFile = new File(originalName);
        if (exactVersionFile.exists()) {
            return exactVersionFile;
        }

        String browserVersion = capabilities.getVersion();

        if (browserVersion.matches("\\d+")) {
            for (int version = Integer.parseInt(browserVersion); version > 0; version--) {
                String fileName = getScreenshotReferenceName(identifier,
                        version);
View Full Code Here

     *
     * @throws Exception
     *             If something goes wrong
     */
    protected void setupDriver() throws Exception {
        DesiredCapabilities capabilities;

        Browser runLocallyBrowser = getRunLocallyBrowser();
        if (runLocallyBrowser != null) {
            if (System.getenv().containsKey("TEAMCITY_VERSION")) {
                throw new RuntimeException(
View Full Code Here

     */
    public void setDesiredCapabilities(DesiredCapabilities desiredCapabilities) {
        // Make a copy as the desired capabilities can come from a shared,
        // static resource. This will cause all kinds of problems if some test
        // modifies the capabilities
        this.desiredCapabilities = new DesiredCapabilities(desiredCapabilities);
    }
View Full Code Here

         *            the major version
         * @return an object describing the capabilities required for running a
         *         test on the given Safari version
         */
        public static DesiredCapabilities safari(int version) {
            DesiredCapabilities c = DesiredCapabilities.safari();
            c.setPlatform(Platform.MAC);
            c.setVersion("" + version);
            return c;
        }
View Full Code Here

         *            the major version
         * @return an object describing the capabilities required for running a
         *         test on the given Chrome version
         */
        public static DesiredCapabilities chrome(int version) {
            DesiredCapabilities c = DesiredCapabilities.chrome();
            c.setVersion("" + version);
            c.setPlatform(Platform.XP);
            return c;
        }
View Full Code Here

         *            the major version
         * @return an object describing the capabilities required for running a
         *         test on the given Opera version
         */
        public static DesiredCapabilities opera(int version) {
            DesiredCapabilities c = DesiredCapabilities.opera();
            c.setVersion("" + version);
            c.setPlatform(Platform.XP);
            return c;
        }
View Full Code Here

         *            the major version
         * @return an object describing the capabilities required for running a
         *         test on the given Firefox version
         */
        public static DesiredCapabilities firefox(int version) {
            DesiredCapabilities c = DesiredCapabilities.firefox();
            c.setVersion("" + version);
            c.setPlatform(Platform.XP);
            return c;
        }
View Full Code Here

         *            the major version
         * @return an object describing the capabilities required for running a
         *         test on the given Internet Explorer version
         */
        public static DesiredCapabilities ie(int version) {
            DesiredCapabilities c = DesiredCapabilities.internetExplorer();
            c.setVersion("" + version);
            c.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION,
                    true);
            return c;
        }
View Full Code Here

         *            the major version
         * @return an object describing the capabilities required for running a
         *         test on the given PhantomJS version
         */
        public static DesiredCapabilities phantomJS(int version) {
            DesiredCapabilities c = DesiredCapabilities.phantomjs();
            c.setPlatform(Platform.LINUX);
            c.setVersion("" + version);
            return c;
        }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.remote.DesiredCapabilities

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.