Java Code Examples for org.jsoup.nodes.Element#cssSelector()

The following examples show how to use org.jsoup.nodes.Element#cssSelector() . 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: ResourceCheckSteps.java    From vividus with Apache License 2.0 5 votes vote down vote up
private String getSelector(Element element)
{
    try
    {
        return element.cssSelector();
    }
    catch (SelectorParseException exception)
    {
        return "N/A";
    }
}
 
Example 2
Source File: InputField.java    From apogen with Apache License 2.0 5 votes vote down vote up
public InputField(Element singleElement) {
	super();
	tag = "input";
	this.type = "text"; // default type
	this.variableName = UtilsStaticAnalyzer.getElementName(singleElement);
	this.locator = singleElement.cssSelector();
	this.isMethod = false;
}
 
Example 3
Source File: Button.java    From apogen with Apache License 2.0 5 votes vote down vote up
public Button(Element singleElement) {
	super();
	tag = "button";
	this.defaultAction = "click";
	this.variableName = UtilsStaticAnalyzer.getElementName(singleElement);
	this.locator = singleElement.cssSelector();
}
 
Example 4
Source File: Image.java    From apogen with Apache License 2.0 5 votes vote down vote up
public Image(Element singleElement) {
	super();
	tag = "img";
	this.defaultAction = "click";
	this.variableName = UtilsStaticAnalyzer.getElementName(singleElement);
	this.locator = singleElement.cssSelector();
}
 
Example 5
Source File: Anchor.java    From apogen with Apache License 2.0 5 votes vote down vote up
public Anchor(Element singleElement) {
	super();
	tag = "a";
	this.defaultAction = "click";
	this.variableName = UtilsStaticAnalyzer.getElementName(singleElement);
	this.locator = singleElement.cssSelector();
}
 
Example 6
Source File: Select.java    From apogen with Apache License 2.0 4 votes vote down vote up
public Select(Element singleElement) {
	super();
	tag = "select";
	this.variableName = UtilsStaticAnalyzer.getElementName(singleElement);
	this.locator = singleElement.cssSelector();
}
 
Example 7
Source File: TextArea.java    From apogen with Apache License 2.0 4 votes vote down vote up
public TextArea(Element singleElement) {
	super();
	tag = "textarea";
	this.variableName = UtilsStaticAnalyzer.getElementName(singleElement);
	this.locator = singleElement.cssSelector();
}