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

holmos.webtest.element.tool.WebElementExist Maven / Gradle / Ivy

There is a newer version: 1.0.2u10
Show newest version
package holmos.webtest.element.tool;

import holmos.webtest.constvalue.ConstValue;
import holmos.webtest.element.ListElement;
import holmos.webtest.element.locator.Locator;
import holmos.webtest.element.locator.LocatorChain;
import holmos.webtest.element.locator.LocatorValue;

/**用来判断数据结构是否存在的工具类*/
public class WebElementExist {
	protected LocatorValue webElement;
	protected LocatorChain infoChain;
	protected Locator locator;
	public WebElementExist(LocatorValue webElement){
		this.webElement=webElement;
		this.infoChain=webElement.getInfoChain();
		this.locator=webElement.getLocator();
	}
	protected void initComment(){
		StringBuilder commentTemp=new StringBuilder();
		for(int i=0;i");
		}
		if(webElement instanceof ListElement)
			commentTemp.append(((ListElement)webElement).getComment());
		else
			commentTemp.append(webElement.getComment());
		webElement.setWholeComment(commentTemp.toString());
	}
	/**
	 * 自己设置等待次数,一次50ms
	 * @param WaitCount 等待次数
	 * */
	public boolean isElementExist(int WaitCount){
		return false;
	}
	/**只等待一次*/
	public boolean isElementExistForCheckOnce(){
		return false;
	}
	public int getListElementSize(){
		return ConstValue.ERROR;
	}
	public int getCollectionSize(){
		return ConstValue.ERROR;
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy