Java Code Examples for com.gargoylesoftware.htmlunit.BrowserVersion#getBrowserVersionNumeric()

The following examples show how to use com.gargoylesoftware.htmlunit.BrowserVersion#getBrowserVersionNumeric() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BrowserConfiguration.java    From HtmlUnit-Android with Apache License 2.0 5 votes vote down vote up
static BrowserConfiguration getMatchingConfiguration(
        final BrowserVersion browserVersion,
        final BrowserConfiguration[] browserConfigurations) {

    for (final BrowserConfiguration browserConfiguration : browserConfigurations) {
        if (browserVersion.getNickname().startsWith(browserConfiguration.browserFamily_)
                && browserVersion.getBrowserVersionNumeric() >= browserConfiguration.minVersionNumber_
                && browserVersion.getBrowserVersionNumeric() <= browserConfiguration.maxVersionNumber_) {
            return browserConfiguration;
        }
    }

    return null;
}
 
Example 2
Source File: BrowserConfiguration.java    From htmlunit with Apache License 2.0 4 votes vote down vote up
@Override
public boolean matches(final BrowserVersion browserVersion) {
    return browserVersion.isFirefox() && browserVersion.getBrowserVersionNumeric() == 60;
}
 
Example 3
Source File: BrowserConfiguration.java    From htmlunit with Apache License 2.0 4 votes vote down vote up
@Override
public boolean matches(final BrowserVersion browserVersion) {
    return browserVersion.isFirefox() && browserVersion.getBrowserVersionNumeric() == 68;
}
 
Example 4
Source File: BrowserConfiguration.java    From htmlunit with Apache License 2.0 4 votes vote down vote up
@Override
public boolean matches(final BrowserVersion browserVersion) {
    return browserVersion.isFirefox() && browserVersion.getBrowserVersionNumeric() <= 68;
}
 
Example 5
Source File: BrowserConfiguration.java    From htmlunit with Apache License 2.0 4 votes vote down vote up
@Override
public boolean matches(final BrowserVersion browserVersion) {
    return browserVersion.isFirefox() && browserVersion.getBrowserVersionNumeric() >= 68;
}
 
Example 6
Source File: BrowserConfiguration.java    From htmlunit with Apache License 2.0 4 votes vote down vote up
@Override
public boolean matches(final BrowserVersion browserVersion) {
    return browserVersion.isFirefox() && browserVersion.getBrowserVersionNumeric() > 68;
}