2012-12-13 16:22:56 +07:00
|
|
|
package test;
|
|
|
|
|
|
|
|
import static org.junit.Assert.*;
|
|
|
|
|
2012-12-14 15:48:09 +07:00
|
|
|
import org.idempiere.ui.zk.selenium.Zk;
|
2012-12-13 16:22:56 +07:00
|
|
|
import org.junit.*;
|
2012-12-14 15:48:09 +07:00
|
|
|
import org.openqa.selenium.WebElement;
|
2012-12-13 16:22:56 +07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Web Driver + zk jq selector, doesn't required AdempiereIdGenerator
|
|
|
|
* @author hengsin
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public class SelectTabTest extends AbstractTestCase {
|
|
|
|
@Test
|
|
|
|
public void testSelectTab() throws Exception {
|
|
|
|
login();
|
|
|
|
waitResponse();
|
2012-12-14 15:48:09 +07:00
|
|
|
comboboxSelectItem("$treeSearchCombo", "Product");
|
2012-12-13 16:22:56 +07:00
|
|
|
waitResponse();
|
|
|
|
clickButton("$findWindow_1 $simpleSearch $btnOk");
|
|
|
|
waitResponse();
|
|
|
|
selectTab("$Product_1 $detailPane @tabbox", 2);
|
|
|
|
assertFalse("Business Partner".equals(selectedTab("$Product_1 $detailPane @tabbox")));
|
|
|
|
waitResponse();
|
|
|
|
selectTab("$Product_1 $detailPane @tabbox", "Business Partner");
|
|
|
|
assertEquals("Business Partner", selectedTab("$Product_1 $detailPane @tabbox"));
|
2012-12-14 15:48:09 +07:00
|
|
|
|
|
|
|
WebElement element = driver.findElement(Zk.jq("$Product_1 $Product @textbox[columnName=\"Name\"]"));
|
|
|
|
assertNotNull(element);
|
2012-12-13 16:22:56 +07:00
|
|
|
}
|
|
|
|
}
|