Package com.googlecode.jmeter.plugins.webdriver.config

Examples of com.googlecode.jmeter.plugins.webdriver.config.FirefoxDriverConfig


        return "FirefoxDriverConfig";
    }

    @Override
    public TestElement createTestElement() {
        FirefoxDriverConfig element = new FirefoxDriverConfig();
        modifyTestElement(element);
        return element;
    }
View Full Code Here


    @Override
    public void configure(TestElement element) {
        super.configure(element);
        if (element instanceof FirefoxDriverConfig) {
            FirefoxDriverConfig config = (FirefoxDriverConfig) element;
            userAgentOverrideCheckbox.setSelected(config.isUserAgentOverridden());
            userAgentOverrideText.setText(config.getUserAgentOverride());
        }
    }
View Full Code Here

    @Override
    public void modifyTestElement(TestElement element) {
        super.modifyTestElement(element);
        if (element instanceof FirefoxDriverConfig) {
            FirefoxDriverConfig config = (FirefoxDriverConfig) element;
            config.setUserAgentOverridden(userAgentOverrideCheckbox.isSelected());
            if(userAgentOverrideCheckbox.isSelected()) {
                config.setUserAgentOverride(userAgentOverrideText.getText());
            }
        }
    }
View Full Code Here

    @Test
    public void shouldOverrideUserAgent() {
        gui.userAgentOverrideCheckbox.setSelected(true);
        gui.userAgentOverrideText.setText("some user agent");
        final FirefoxDriverConfig testElement = (FirefoxDriverConfig) gui.createTestElement();
        assertThat(testElement.getUserAgentOverride(), is("some user agent"));
    }
View Full Code Here

    @Test
    public void shouldNotOverrideUserAgent() {
        gui.userAgentOverrideCheckbox.setSelected(false);
        gui.userAgentOverrideText.setText("some user agent");
        final FirefoxDriverConfig testElement = (FirefoxDriverConfig) gui.createTestElement();
        assertThat(testElement.getUserAgentOverride(), is(not("some user agent")));
    }
View Full Code Here

        assertThat(gui.userAgentOverrideCheckbox.isSelected(), is(false));
    }

    @Test
    public void shouldSetFirefoxDriverConfigOnConfigure() {
        FirefoxDriverConfig config = new FirefoxDriverConfig();
        config.setUserAgentOverride("user-agent");
        config.setUserAgentOverridden(true);
        gui.configure(config);

        assertThat(gui.userAgentOverrideText.getText(), is(config.getUserAgentOverride()));
        assertThat(gui.userAgentOverrideCheckbox.isSelected(), is(config.isUserAgentOverridden()));
    }
View Full Code Here

TOP

Related Classes of com.googlecode.jmeter.plugins.webdriver.config.FirefoxDriverConfig

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.