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

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

public class BTSpan implements Span {

	watij.elements.Span span;

	BTSpan(watij.elements.Span span) {
		this.span = span;
	}

	@Override
	public String getLabel() {
		try {
			return this.span.text();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}
	@Override
	public String getId() {
		try {
			return this.span.id();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}
	@Override
	public String getName() {
		try {
			return this.span.name();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}

	@Override
	public boolean exists() {
		try {
			return this.span.exists();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}

}
