Examples of waitForBackgroundJavaScript()


Examples of com.gargoylesoftware.htmlunit.WebClient.waitForBackgroundJavaScript()

        HtmlPage page = goToChangePasswordPreferencesPage(wc);
        HtmlForm form = page.getHtmlElementById("changePasswordPreferencesForm");
        assertTrue(getRadioByNameAndValue(form, "unmasked", "false").isChecked());
        getRadioByNameAndValue(form, "unmasked", "true").click();
        page = form.getInputByValue("Change").click();
        wc.waitForBackgroundJavaScript(10000L);
        testTitle(page, "Preferences");
        testMessageExists(page, "The password preferences have been changed.");
        WebAssert.assertElementNotPresent(page, "changePasswordPreferencesForm");

        page = page.getAnchorByText("Password preferences").click();
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.waitForBackgroundJavaScript()

        testTitle(page, "Preferences");
        testMessageExists(page, "The password preferences have been changed.");
        WebAssert.assertElementNotPresent(page, "changePasswordPreferencesForm");

        page = page.getAnchorByText("Password preferences").click();
        wc.waitForBackgroundJavaScript(10000L);
        form = page.getHtmlElementById("changePasswordPreferencesForm");
        assertTrue(getRadioByNameAndValue(form, "unmasked", "true").isChecked());
    }

    private void testCancel(boolean withJavascript) throws Exception {
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.waitForBackgroundJavaScript()

        WebClient wc = startWebClient(false);
        wc.setJavaScriptEnabled(withJavascript);
        HtmlPage page = goToChangePasswordPreferencesPage(wc);
        HtmlForm form = page.getHtmlElementById("changePasswordPreferencesForm");
        page = form.getInputByValue("Cancel").click();
        wc.waitForBackgroundJavaScript(10000L);
        testTitle(page, "Preferences");
        WebAssert.assertElementNotPresent(page, "changePasswordPreferencesForm");
    }

    private HtmlPage goToChangePasswordPreferencesPage(WebClient wc) throws Exception {
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.waitForBackgroundJavaScript()

    @Test
    public void testEvalPassword() throws Exception {
        WebClient wc = startWebClient();
        HtmlPage page = wc.getPage(url("/tools/Tools.action"));
        wc.waitForBackgroundJavaScript(10000L);
        HtmlForm form = page.getHtmlElementById("evalPasswordStrengthForm");
        assertFalse(form.asText().contains("10 %"));
        assertTrue(form.asText().contains("0 %"));
        page.getHtmlElementById("passwordToEval").type("he");
        wc.waitForBackgroundJavaScript(10000L);
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.waitForBackgroundJavaScript()

        wc.waitForBackgroundJavaScript(10000L);
        HtmlForm form = page.getHtmlElementById("evalPasswordStrengthForm");
        assertFalse(form.asText().contains("10 %"));
        assertTrue(form.asText().contains("0 %"));
        page.getHtmlElementById("passwordToEval").type("he");
        wc.waitForBackgroundJavaScript(10000L);
        assertTrue(form.asText().contains("10 %"));
    }

    @Test
    public void testGeneratePassword() throws Exception {
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.waitForBackgroundJavaScript()

    @Test
    public void testGeneratePassword() throws Exception {
        WebClient wc = startWebClient();
        HtmlPage page = wc.getPage(url("/tools/Tools.action"));
        wc.waitForBackgroundJavaScript(10000L);
        assertFalse(page.asText().contains("Generated password:"));
        page.getHtmlElementById("generatePasswordButton").click();
        wc.waitForBackgroundJavaScript(10000L);
        assertTrue(page.asText().contains("Generated password:"));
        assertTrue(page.getHtmlElementById("generatedPasswordStrength").asText().contains("93 %"));
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.waitForBackgroundJavaScript()

        WebClient wc = startWebClient();
        HtmlPage page = wc.getPage(url("/tools/Tools.action"));
        wc.waitForBackgroundJavaScript(10000L);
        assertFalse(page.asText().contains("Generated password:"));
        page.getHtmlElementById("generatePasswordButton").click();
        wc.waitForBackgroundJavaScript(10000L);
        assertTrue(page.asText().contains("Generated password:"));
        assertTrue(page.getHtmlElementById("generatedPasswordStrength").asText().contains("93 %"));
    }

    @Test
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.waitForBackgroundJavaScript()

    @Test
    public void testGeneratePasswordButtonEnabledHandler() throws Exception {
        WebClient wc = startWebClient();
        HtmlPage page = wc.getPage(url("/tools/Tools.action"));
        wc.waitForBackgroundJavaScript(10000L);
        assertTrue(StringUtils.isEmpty(page.getHtmlElementById("generatePasswordButton").getAttribute("disabled")));
        ((HtmlCheckBoxInput) page.getHtmlElementById("lowerCaseLettersIncluded")).setChecked(false);
        ((HtmlCheckBoxInput) page.getHtmlElementById("upperCaseLettersIncluded")).setChecked(false);
        ((HtmlCheckBoxInput) page.getHtmlElementById("digitsIncluded")).setChecked(false);
        ((HtmlCheckBoxInput) page.getHtmlElementById("specialCharactersIncluded")).setChecked(false);
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.waitForBackgroundJavaScript()

    @Test
    public void testMaskAndUnmask() throws Exception {
        WebClient wc = startWebClient();
        HtmlPage page = wc.getPage(url("/tools/Tools.action"));
        wc.waitForBackgroundJavaScript(10000L);
        page.getHtmlElementById("generatePasswordButton").click();
        wc.waitForBackgroundJavaScript(10000L);
        assertEquals("masked", page.getHtmlElementById("generatedPassword").getAttribute("class"));
        assertFalse(page.asText().contains("Mask"));
        page.getAnchorByText("Unmask").click();
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.waitForBackgroundJavaScript()

    public void testMaskAndUnmask() throws Exception {
        WebClient wc = startWebClient();
        HtmlPage page = wc.getPage(url("/tools/Tools.action"));
        wc.waitForBackgroundJavaScript(10000L);
        page.getHtmlElementById("generatePasswordButton").click();
        wc.waitForBackgroundJavaScript(10000L);
        assertEquals("masked", page.getHtmlElementById("generatedPassword").getAttribute("class"));
        assertFalse(page.asText().contains("Mask"));
        page.getAnchorByText("Unmask").click();
        assertEquals("unmasked", page.getHtmlElementById("generatedPassword").getAttribute("class"));
        assertFalse(page.asText().contains("Unmask"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.