Package org.jboss.arquillian.ajocado.javascript

Examples of org.jboss.arquillian.ajocado.javascript.JavaScript


     * @param <T> type of value what we are waiting for change
     * @param oldValue value that we are waiting for change
     * @param retriever implementation of retrieving actual value
     */
    public <T> void waitForChange(T oldValue, JavaScriptRetriever<T> retriever) {
        final JavaScript condition = prepareCondition(oldValue, retriever);
        waitExpectingTimeout(condition);
    }
View Full Code Here


     * @param oldValue value that we are waiting for change
     * @param retriever implementation of retrieving actual value
     * @return new retrieved value
     */
    public <T> T waitForChangeAndReturn(T oldValue, JavaScriptRetriever<T> retriever) {
        final JavaScript script = retriever.getJavaScriptRetrieve();
        final JavaScript condition = prepareCondition(oldValue, retriever);

        waitExpectingTimeout(condition);
        String retrieved = selenium.getEval(script);

        T converted = retriever.getConvertor().backwardConversion(retrieved);
View Full Code Here

     *            value that we are waiting for change
     * @param retriever
     *            implementation of retrieving actual value
     */
    public <T> void waitForChange(T oldValue, JavaScriptRetriever<T> retriever) {
        final JavaScript condition = prepareCondition(oldValue, retriever);
        waitExpectingTimeout(condition);
    }
View Full Code Here

     * @param retriever
     *            implementation of retrieving actual value
     * @return new retrieved value
     */
    public <T> T waitForChangeAndReturn(T oldValue, JavaScriptRetriever<T> retriever) {
        final JavaScript script = retriever.getJavaScriptRetrieve();
        final JavaScript condition = prepareCondition(oldValue, retriever);

        waitExpectingTimeout(condition);
        String retrieved = selenium.getEval(script);

        T converted = retriever.getConvertor().backwardConversion(retrieved);
View Full Code Here

        this.configureBrowser();
    }

    protected void loadCustomLocationStrategies() {
        // jQuery location strategy
        JavaScript strategySource = fromResource("javascript/selenium-location-strategies/jquery-location-strategy.js");
        this.addLocationStrategy(ElementLocationStrategy.JQUERY, strategySource);
    }
View Full Code Here

        selenium.addScript(extension);
        selenium.getEval(setResourceNameForId.parametrize(identification, escapedResourceName));
    }

    private void refreshScript(String resourceName) {
        JavaScript extension = JavaScript.fromResource(resourceName);
        String identification = extension.getIdentification();
        String escapedResourceName = escapeJavaScript(resourceName);

        String scriptId = selenium.getEval(getIdForScriptWithResourceName.parametrize(escapedResourceName));

        if (!scriptId.equals(identification)) {
View Full Code Here

     * the loading of extensions. That is reason why we must explicitly register it before the test after each start of
     * selenium.
     */
    @Override
    public void registerCustomHandlers() {
        final JavaScript registerCustomHandlers = js("currentTest.commandFactory.registerAll(selenium)");
        selenium.getEval(registerCustomHandlers);
    }
View Full Code Here

     * @param resourceNames
     *            the list of full paths to resources
     */
    @Override
    public void loadFromResources(List<String> resourceNames) {
        JavaScript extensions = null;
        for (String resourceName : resourceNames) {
            JavaScript partial = JavaScript.fromResource(resourceName);
            extensions = (extensions == null) ? partial : extensions.join(partial);
        }
        this.pageExtensions = extensions;
    }
View Full Code Here

     *            value that we are waiting for change
     * @param retriever
     *            implementation of retrieving actual value
     */
    public <T> void waitForChange(T oldValue, JavaScriptRetriever<T> retriever) {
        final JavaScript condition = prepareCondition(oldValue, retriever);
        waitExpectingTimeout(condition);
    }
View Full Code Here

     * @param retriever
     *            implementation of retrieving actual value
     * @return new retrieved value
     */
    public <T> T waitForChangeAndReturn(T oldValue, JavaScriptRetriever<T> retriever) {
        final JavaScript script = retriever.getJavaScriptRetrieve();
        final JavaScript condition = prepareCondition(oldValue, retriever);

        waitExpectingTimeout(condition);
        String retrieved = selenium.getEval(script);

        T converted = retriever.getConvertor().backwardConversion(retrieved);
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.ajocado.javascript.JavaScript

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.