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

com.crawljax.condition.UrlCondition Maven / Gradle / Ivy

Go to download

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);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy