@Override
	public boolean check(EmbeddedBrowser browser) {
		String js =
				"try{ if(" + expression + "){return '1';}else{" + "return '0';}}catch(e){"
						+ " return '0';}";
		try {
			Object object = browser.executeJavaScript(js);
			if (object == null) {
				return false;
			}
			return object.toString().equals("1");
		} catch (CrawljaxException e) {
			// Exception is caught, check failed so return false;
			return false;
		}
	}
@ Override public boolean check ( EmbeddedBrowser browser ) { String js = "try{ if(" + expression + "){return '1';}else{" + "return '0';}}catch(e){" + " return '0';}" ; try { Object object = browser . executeJavaScript ( js ) ; if ( object == null ) { return false ; } return object . toString ( ) . equals ( "1" ) ; } catch ( CrawljaxException e ) { return false ; } }
Check invariant.

@param browser The browser.
@return Whether the condition is satisfied or <code>false</code> when it it isn't or a
{@link CrawljaxException} occurs.