All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.nemerosa.ontrack.acceptance.browser.Browser.groovy Maven / Gradle / Ivy

The newest version!
package net.nemerosa.ontrack.acceptance.browser

import org.apache.commons.lang3.reflect.ConstructorUtils

class Browser {

    @Delegate
    private final Configuration configuration;

    Browser(Configuration configuration) {
        this.configuration = configuration;
    }

    Configuration getConfiguration() {
        configuration
    }

    def 

P goTo(Class

pageClass, Map parameters = [:], boolean wait = true) { P page = page(pageClass) String path = page.getPath(parameters); configuration.goTo(path); if (wait) { page.waitFor(); } return page; } def

P at(Class

pageClass) { P page = page(pageClass) page.waitFor() page } def

P page(Class

pageClass) { P page; try { page = ConstructorUtils.invokeExactConstructor(pageClass, this); } catch (Exception e) { throw new CannotBuildPageException(pageClass, e); } page } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy