com.crawljax.condition.UrlCondition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of crawljax Show documentation
Show all versions of crawljax Show documentation
Crawling Ajax applications through dynamic analysis and
reconstruction of the UI state changes. Crawljax is based on a
method which dynamically builds a `state-flow graph' modeling
the various navigation paths and states within an Ajax
application.
The newest version!
package com.crawljax.condition;
import net.jcip.annotations.Immutable;
import com.crawljax.browser.EmbeddedBrowser;
/**
* Conditions that returns true iff the browser's current url contains url. Note: Case insesitive
*
* @author [email protected] (Danny Roest)
* @version $Id$
*/
@Immutable
public class UrlCondition extends AbstractCondition {
private final String url;
/**
* @param url
* the URL.
*/
public UrlCondition(String url) {
this.url = url;
}
@Override
public boolean check(EmbeddedBrowser browser) {
return browser.getCurrentUrl().toLowerCase().contains(url);
}
}