当前位置: 首页>>代码示例>>Java>>正文


Java Color.fromString方法代码示例

本文整理汇总了Java中org.openqa.selenium.support.Color.fromString方法的典型用法代码示例。如果您正苦于以下问题:Java Color.fromString方法的具体用法?Java Color.fromString怎么用?Java Color.fromString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.openqa.selenium.support.Color的用法示例。


在下文中一共展示了Color.fromString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getSeriesColorAtXAxisPosition

import org.openqa.selenium.support.Color; //导入方法依赖的package包/类
protected Color getSeriesColorAtXAxisPosition(int series,
		String xAxisLabelValue) {
	// The series can vary depending on the structure of the chart, by
	// default it is fine but if this doesn't work you may need to tweak the
	// series
	int barNumber = getXAxisLabelsText().indexOf(xAxisLabelValue);
	// The below varies depending on the structure of the chart, by default
	// we need to multiply by 4
	barNumber = barNumber * 4;
	return Color.fromString(chart.findElement(
			By.cssSelector(".highcharts-series-group > g:nth-of-type("
					+ series + ") > rect:nth-of-type(" + barNumber + ")"))
			.getAttribute("fill"));
}
 
开发者ID:gautamsabba,项目名称:UIFramework,代码行数:15,代码来源:HighCharts.java

示例2: matchesSafely

import org.openqa.selenium.support.Color; //导入方法依赖的package包/类
@Override
protected boolean matchesSafely(WebElement item,
        Description mismatchDescription) {
    Color actualColor = Color.fromString(item.getCssValue(attributeName));
    if (actualColor.equals(expectedColor))
        return true;
    else {
        mismatchDescription.appendText(attributeName + " was " + toString(actualColor));
        return false;
    }
}
 
开发者ID:jhc-systems,项目名称:redsniff,代码行数:12,代码来源:ColorMatcher.java

示例3: getAttributeAsColor

import org.openqa.selenium.support.Color; //导入方法依赖的package包/类
/**
 * Return the given attribute as a color or null if the attribute is not
 * specified.
 * 
 * @param attributeName
 * @return
 */
public Color getAttributeAsColor(String attributeName) {
	try {
		return Color.fromString(element.getAttribute(attributeName));
	} catch (Exception e) {
		return null;
	}
}
 
开发者ID:gwtd3,项目名称:gwt-d3,代码行数:15,代码来源:ElementPageObject.java

示例4: getMarkingsColorUsedBackground

import org.openqa.selenium.support.Color; //导入方法依赖的package包/类
@Override
public Color getMarkingsColorUsedBackground() {
    return Color.fromString(getStringProperty(key(NamedProperties.MARKINGS_USED_BACKGROUND), "#ffd2a5"));
}
 
开发者ID:testIT-WebTester,项目名称:webtester2-core,代码行数:5,代码来源:BaseConfiguration.java

示例5: getMarkingsColorUsedOutline

import org.openqa.selenium.support.Color; //导入方法依赖的package包/类
@Override
public Color getMarkingsColorUsedOutline() {
    return Color.fromString(getStringProperty(key(NamedProperties.MARKINGS_USED_OUTLINE), "#916f22"));
}
 
开发者ID:testIT-WebTester,项目名称:webtester2-core,代码行数:5,代码来源:BaseConfiguration.java

示例6: getMarkingsColorReadBackground

import org.openqa.selenium.support.Color; //导入方法依赖的package包/类
@Override
public Color getMarkingsColorReadBackground() {
    return Color.fromString(getStringProperty(key(NamedProperties.MARKINGS_READ_BACKGROUND), "#90ee90"));
}
 
开发者ID:testIT-WebTester,项目名称:webtester2-core,代码行数:5,代码来源:BaseConfiguration.java

示例7: getMarkingsColorReadOutline

import org.openqa.selenium.support.Color; //导入方法依赖的package包/类
@Override
public Color getMarkingsColorReadOutline() {
    return Color.fromString(getStringProperty(key(NamedProperties.MARKINGS_READ_OUTLINE), "#008000"));
}
 
开发者ID:testIT-WebTester,项目名称:webtester2-core,代码行数:5,代码来源:BaseConfiguration.java

示例8: getMarkingsColorUsedBackground

import org.openqa.selenium.support.Color; //导入方法依赖的package包/类
@Override
public Color getMarkingsColorUsedBackground() {
    return Color.fromString(getStringProperty(key(NamedProperties.MARKINGS_COLOR_USED_BACKGROUND), "#ffd2a5"));
}
 
开发者ID:testIT-WebTester,项目名称:webtester-core,代码行数:5,代码来源:BaseConfiguration.java

示例9: getMarkingsColorUsedOutline

import org.openqa.selenium.support.Color; //导入方法依赖的package包/类
@Override
public Color getMarkingsColorUsedOutline() {
    return Color.fromString(getStringProperty(key(NamedProperties.MARKINGS_COLOR_USED_OUTLINE), "#916f22"));
}
 
开发者ID:testIT-WebTester,项目名称:webtester-core,代码行数:5,代码来源:BaseConfiguration.java

示例10: getMarkingsColorReadBackground

import org.openqa.selenium.support.Color; //导入方法依赖的package包/类
@Override
public Color getMarkingsColorReadBackground() {
    return Color.fromString(getStringProperty(key(NamedProperties.MARKINGS_COLOR_READ_BACKGROUND), "#90ee90"));
}
 
开发者ID:testIT-WebTester,项目名称:webtester-core,代码行数:5,代码来源:BaseConfiguration.java

示例11: getMarkingsColorReadOutline

import org.openqa.selenium.support.Color; //导入方法依赖的package包/类
@Override
public Color getMarkingsColorReadOutline() {
    return Color.fromString(getStringProperty(key(NamedProperties.MARKINGS_COLOR_READ_OUTLINE), "#008000"));
}
 
开发者ID:testIT-WebTester,项目名称:webtester-core,代码行数:5,代码来源:BaseConfiguration.java

示例12: hasColor

import org.openqa.selenium.support.Color; //导入方法依赖的package包/类
public static Matcher<WebElement> hasColor(String colorAsString) {
    return new ColorMatcher("color", Color.fromString(colorAsString));
}
 
开发者ID:jhc-systems,项目名称:redsniff,代码行数:4,代码来源:ColorMatcher.java

示例13: hasBackgroundColor

import org.openqa.selenium.support.Color; //导入方法依赖的package包/类
public static Matcher<WebElement> hasBackgroundColor(String colorAsString) {
    return new ColorMatcher("background-color", Color.fromString(colorAsString));
}
 
开发者ID:jhc-systems,项目名称:redsniff,代码行数:4,代码来源:ColorMatcher.java

示例14: match

import org.openqa.selenium.support.Color; //导入方法依赖的package包/类
@Override
public boolean match(final String actualValue) {
    Color actualColor = Color.fromString(actualValue);
    Color expectedColor = Color.fromString(this.expectedColor);
    return actualColor.equals(expectedColor);
}
 
开发者ID:gwtd3,项目名称:gwt-d3,代码行数:7,代码来源:CssColorPropertyEquals.java

示例15: isEqualTo

import org.openqa.selenium.support.Color; //导入方法依赖的package包/类
public ColorAssert isEqualTo(String expected) {
	return super.isEqualTo(Color.fromString(expected));
}
 
开发者ID:gwtd3,项目名称:gwt-d3,代码行数:4,代码来源:ColorAssert.java


注:本文中的org.openqa.selenium.support.Color.fromString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。