package jp.sourceforge.cfneo.at4ie2.api.browser.impl.ie;

import jp.sourceforge.cfneo.at4ie2.BTRuntimeError;
import jp.sourceforge.cfneo.at4ie2.api.browser.Div;

public class BTDiv implements Div {

	watij.elements.Div div;

	BTDiv(watij.elements.Div div) {
		this.div = div;
	}
	@Override
	public String getLabel() {
		try {
			return this.div.text();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}
	@Override
	public String getTitle() {
		try {
			return this.div.title();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}
	@Override
	public String getId() {
		try {
			return this.div.id();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}
	@Override
	public boolean exists() {
		try {
			return this.div.exists();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}
	@Override
	public String getName() {
		try {
			return this.div.id();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}

}
