本文整理汇总了Java中com.thoughtworks.selenium.SeleneseTestBase.assertEquals方法的典型用法代码示例。如果您正苦于以下问题:Java SeleneseTestBase.assertEquals方法的具体用法?Java SeleneseTestBase.assertEquals怎么用?Java SeleneseTestBase.assertEquals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.thoughtworks.selenium.SeleneseTestBase
的用法示例。
在下文中一共展示了SeleneseTestBase.assertEquals方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testLookUpComponent
import com.thoughtworks.selenium.SeleneseTestBase; //导入方法依赖的package包/类
protected void testLookUpComponent(String docId, String componentName, String componentCode) throws Exception {
selectFrameIframePortlet();
//Lookup
waitAndTypeByName("name", componentName);
waitAndClickSearch();
isElementPresentByLinkText(componentName);
waitAndClickByLinkText(componentName);
waitForPageToLoad();
Thread.sleep(2000);
switchToWindow("Kuali :: Inquiry");
Thread.sleep(2000);
SeleneseTestBase.assertEquals(componentName, getTextByXpath("//div[@class='tab-container']/table//span[@id='name.div']").trim());
SeleneseTestBase.assertEquals(componentCode, getTextByXpath("//div[@class='tab-container']/table//span[@id='code.div']").trim());
waitAndClickCloseWindow();
switchToWindow("null");
}
示例2: testEditComponent
import com.thoughtworks.selenium.SeleneseTestBase; //导入方法依赖的package包/类
protected void testEditComponent(String docId, String componentName, String componentCode) throws Exception {
selectFrameIframePortlet();
waitAndClickEdit();
waitForPageToLoad();
docId = waitForDocId();
waitAndTypeByName("document.documentHeader.documentDescription", "Editing Test Component");
clearTextByName("document.newMaintainableObject.name");
waitAndTypeByName("document.newMaintainableObject.name", componentName);
waitAndClickSave();
waitAndClickSubmit();
waitForPageToLoad();
assertElementPresentByXpath(DOC_SUBMIT_SUCCESS_MSG_XPATH,"Document is not submitted successfully");
selectTopFrame();
waitAndClickDocSearchTitle();
waitForPageToLoad();
selectFrameIframePortlet();
waitAndClickSearch();
Thread.sleep(2000);
SeleneseTestBase.assertEquals(docId, getTextByXpath(DOC_ID_XPATH_3));
SeleneseTestBase.assertEquals(DOC_STATUS_FINAL, getTextByXpath(DOC_STATUS_XPATH_2));
selectTopFrame();
}
示例3: testAddBlankLine
import com.thoughtworks.selenium.SeleneseTestBase; //导入方法依赖的package包/类
/**
* Test adding a column of values to the Add Blank Line Tests Table Layout
*/
protected void testAddBlankLine() throws Exception {
waitAndClickByLinkText("Add Blank Line");
waitAndClickByXpath("//button[contains(.,'Add Line')]");
Thread.sleep(3000); // TODO a wait until the loading.gif isn't visible woudl be better
assertElementPresentByName("list1[0].field1");
assertTableLayout();
SeleneseTestBase.assertEquals("", getAttributeByName("list1[0].field1", "value"));
SeleneseTestBase.assertEquals("", getAttributeByName("list1[0].field2", "value"));
SeleneseTestBase.assertEquals("", getAttributeByName("list1[0].field3", "value"));
SeleneseTestBase.assertEquals("", getAttributeByName("list1[0].field4", "value"));
SeleneseTestBase.assertEquals("5", getAttributeByName("list1[1].field1", "value"));
SeleneseTestBase.assertEquals("6", getAttributeByName("list1[1].field2", "value"));
SeleneseTestBase.assertEquals("7", getAttributeByName("list1[1].field3", "value"));
SeleneseTestBase.assertEquals("8", getAttributeByName("list1[1].field4", "value"));
SeleneseTestBase.assertEquals("Total: 419", driver.findElement(By.xpath("//fieldset/div/div[2]/div[2]")).getText());
waitAndTypeByName("list1[0].field1", "1");
waitAndTypeByName("list1[0].field2", "1");
waitAndTypeByName("list1[0].field3", "1");
waitAndTypeByName("list1[0].field4", "1");
SeleneseTestBase.assertEquals("Total: 420", driver.findElement(By.xpath("//fieldset/div/div[2]/div[2]")).getText());
}
示例4: testCreateNewComponent
import com.thoughtworks.selenium.SeleneseTestBase; //导入方法依赖的package包/类
protected String testCreateNewComponent(String componentName, String componentCode, String message) throws Exception {
waitForPageToLoad();
String docId = waitForDocId();
//Enter details for Parameter.
waitAndTypeByName("document.documentHeader.documentDescription", "Adding Test Component");
selectOptionByName("document.newMaintainableObject.namespaceCode", "KR-IDM");
waitAndTypeByName("document.newMaintainableObject.code", componentCode);
waitAndTypeByName("document.newMaintainableObject.name", componentName);
checkByName("document.newMaintainableObject.active");
waitAndClickSave();
waitAndClickSubmit();
waitForPageToLoad();
assertElementPresentByXpath(DOC_SUBMIT_SUCCESS_MSG_XPATH, CREATE_NEW_DOCUMENT_NOT_SUBMITTED_SUCCESSFULLY_MESSAGE_TEXT + message);
selectTopFrame();
waitAndClickDocSearchTitle();
waitForPageToLoad();
selectFrameIframePortlet();
waitAndClickSearch();
Thread.sleep(2000);
SeleneseTestBase.assertEquals(docId, getTextByXpath(DOC_ID_XPATH_3));
SeleneseTestBase.assertEquals(DOC_STATUS_FINAL, getTextByXpath(DOC_STATUS_XPATH_2));
selectTopFrame();
return docId;
}
示例5: testVerifyEditedComponent
import com.thoughtworks.selenium.SeleneseTestBase; //导入方法依赖的package包/类
protected void testVerifyEditedComponent(String docId, String componentName, String componentCode) throws Exception {
selectFrameIframePortlet();
waitAndTypeByName("name", componentName);
waitAndClickSearch();
isElementPresentByLinkText(componentName);
waitAndClickByLinkText(componentName);
waitForPageToLoad();
Thread.sleep(2000);
switchToWindow("Kuali :: Inquiry");
Thread.sleep(2000);
SeleneseTestBase.assertEquals(componentName, getTextByXpath("//div[@class='tab-container']/table//span[@id='name.div']").trim());
SeleneseTestBase.assertEquals(componentCode, getTextByXpath("//div[@class='tab-container']/table//span[@id='code.div']").trim());
waitAndClickCloseWindow();
switchToWindow("null");
List<String> parameterList=new ArrayList<String>();
}
示例6: testDocTypeLookup
import com.thoughtworks.selenium.SeleneseTestBase; //导入方法依赖的package包/类
protected void testDocTypeLookup() throws Exception {
selectFrameIframePortlet();
waitAndClickByXpath("//input[@title='Search Parent Name']");
waitForPageToLoad();
waitAndClickByXpath(SAVE_XPATH_3);
waitAndClickByXpath("//table[@id='row']/tbody/tr[contains(td[3],'RiceDocument')]/td[1]/a");
waitForPageToLoad();
waitAndClickByXpath(SAVE_XPATH_3);
SeleneseTestBase.assertEquals("RiceDocument", getTextByXpath("//table[@id='row']/tbody/tr/td[4]/a"));
waitAndClickByName("methodToCall.clearValues");
waitAndTypeByName("name", "Kuali*D");
waitAndClickByXpath(SAVE_XPATH_3);
assertElementPresentByXpath("//table[@id='row']/tbody/tr[contains(td[3], 'KualiDocument')]");
String docIdOld = getTextByXpath("//table[@id='row']/tbody/tr[contains(td[3], 'KualiDocument')]/td[2]/a");
waitAndClickByName("methodToCall.clearValues");
waitAndTypeByName("label", "KualiDocument");
waitAndClickByXpath(SAVE_XPATH_3);
assertElementPresentByXpath("//table[@id='row']/tbody/tr[contains(td[5], 'KualiDocument')]");
waitAndClickByName("methodToCall.clearValues");
waitAndTypeByName("documentTypeId", docIdOld);
waitAndClickByXpath(SAVE_XPATH_3);
assertElementPresentByXpath("//table[@id='row']/tbody/tr[contains(td[2], '" + docIdOld + "')]");
}
示例7: testVerifyAddDeleteFiscalOfficerLegacy
import com.thoughtworks.selenium.SeleneseTestBase; //导入方法依赖的package包/类
protected void testVerifyAddDeleteFiscalOfficerLegacy() throws Exception {
selectFrameIframePortlet();
checkForIncidentReport("testVerifyAddDeleteFiscalOfficerLegacy");
waitAndTypeByName("document.documentHeader.documentDescription", ITUtil.createUniqueDtsPlusTwoRandomChars());
waitAndTypeByName("newCollectionLines['document.newMaintainableObject.dataObject.fiscalOfficer.accounts'].number","1234567890");
waitAndTypeByName("newCollectionLines['document.newMaintainableObject.dataObject.fiscalOfficer.accounts'].foId", "2");
waitAndClickByXpath("//button[@data-loadingmessage='Adding Line...']");
waitForElementPresentByName("document.newMaintainableObject.dataObject.fiscalOfficer.accounts[0].number");
SeleneseTestBase.assertEquals("1234567890", getAttributeByName(
"document.newMaintainableObject.dataObject.fiscalOfficer.accounts[0].number", "value"));
SeleneseTestBase.assertEquals("2", getAttributeByName(
"document.newMaintainableObject.dataObject.fiscalOfficer.accounts[0].foId", "value"));
waitAndClickByXpath("//button[@data-loadingmessage='Deleting Line...']");
Thread.sleep(3000);
SeleneseTestBase.assertEquals(Boolean.FALSE, (Boolean) isElementPresentByName(
"document.newMaintainableObject.dataObject.fiscalOfficer.accounts[0].number"));
passed();
}
示例8: testEditRouteRulesDelegation
import com.thoughtworks.selenium.SeleneseTestBase; //导入方法依赖的package包/类
protected void testEditRouteRulesDelegation() throws Exception {
waitForPageToLoad();
Thread.sleep(3000);
SeleneseTestBase.assertEquals("Kuali Portal Index", getTitle());
selectFrameIframePortlet();
waitAndClickSearch();
waitForPageToLoad();
Thread.sleep(3000);
waitAndClickEdit();
waitForPageToLoad();
Thread.sleep(3000);
SeleneseTestBase.assertTrue(isElementPresentByName(CANCEL_NAME));
waitAndClickCancel();
waitForPageToLoad();
Thread.sleep(3000);
waitAndClickByName("methodToCall.processAnswer.button0");
waitForPageToLoad();
passed();
}
示例9: testDirtyFieldsCheck
import com.thoughtworks.selenium.SeleneseTestBase; //导入方法依赖的package包/类
protected void testDirtyFieldsCheck() throws Exception {
waitForPageToLoad();
waitAndTypeByName("field1", "test 1");
waitAndTypeByName("field102", "test 2");
assertCancelConfirmation();
// testing manually
waitForElementPresentByName("field100");
waitAndTypeByName("field100", "here");
waitAndTypeByName("field103", "there");
// 'Validation' navigation link
assertCancelConfirmation();
// testing manually
waitForElementPresentByName("field106");
// //Asserting text-field style to uppercase. This style would display
// input text in uppercase.
assertTrue(waitAndGetAttributeByName("field112", "style").contains("text-transform: uppercase;"));
assertCancelConfirmation();
waitForElementPresentByName("field101");
assertEquals("val", waitAndGetAttributeByName("field101", "value"));
clearTextByName("field101");
waitAndTypeByName("field101", "1");
waitAndTypeByName("field104", "");
SeleneseTestBase.assertEquals("1", waitAndGetAttributeByName("field101", "value"));
waitAndTypeByName("field104", "2");
// 'Progressive Disclosure' navigation link
assertCancelConfirmation();
}
示例10: assertPopUpWindowUrl
import com.thoughtworks.selenium.SeleneseTestBase; //导入方法依赖的package包/类
/**
* Assert that clicking an element causes a popup window with a specific URL
*
* @param by The locating mechanism of the element to be clicked
* @param windowName The name of the popup window
* @param url The URL of the popup window
*/
public void assertPopUpWindowUrl(By by, String windowName, String url) {
driver.findElement(by).click();
String parentWindowHandle = driver.getWindowHandle();
// wait page to be loaded
driver.switchTo().window(windowName).findElements(By.tagName("head"));
SeleneseTestBase.assertEquals(url, driver.getCurrentUrl());
driver.switchTo().window(parentWindowHandle);
}
示例11: testIfRowHasBeenAdded
import com.thoughtworks.selenium.SeleneseTestBase; //导入方法依赖的package包/类
protected void testIfRowHasBeenAdded() throws Exception {
//Check if row has been added really or not
SeleneseTestBase.assertEquals("", getAttributeByName("newCollectionLines['list1'].field1", "value"));
SeleneseTestBase.assertEquals("", getAttributeByName("newCollectionLines['list1'].field2", "value"));
SeleneseTestBase.assertEquals("", getAttributeByName("newCollectionLines['list1'].field3", "value"));
SeleneseTestBase.assertEquals("", getAttributeByName("newCollectionLines['list1'].field4", "value"));
SeleneseTestBase.assertEquals("1", getAttributeByName("list1[0].field1", "value"));
SeleneseTestBase.assertEquals("1", getAttributeByName("list1[0].field2", "value"));
SeleneseTestBase.assertEquals("1", getAttributeByName("list1[0].field3", "value"));
SeleneseTestBase.assertEquals("1", getAttributeByName("list1[0].field4", "value"));
}
示例12: assertDocFinal
import com.thoughtworks.selenium.SeleneseTestBase; //导入方法依赖的package包/类
protected void assertDocFinal(String docId) throws InterruptedException {
jiraAwareWaitFor(By.linkText("spreadsheet"), "");
if (isElementPresent(By.linkText(docId))) {
SeleneseTestBase.assertEquals(DOC_STATUS_FINAL, getDocStatus());
} else {
SeleneseTestBase.assertEquals(docId,driver.findElement(By.xpath(DOC_ID_XPATH_2)));
SeleneseTestBase.assertEquals(DOC_STATUS_FINAL, getDocStatus());
}
}
示例13: testCreateNewPermission
import com.thoughtworks.selenium.SeleneseTestBase; //导入方法依赖的package包/类
protected List<String> testCreateNewPermission(String docId, String permissionName) throws Exception
{
waitForPageToLoad();
Thread.sleep(2000);
docId = waitForDocId();
waitAndClickSave();
waitForPageToLoad();
assertElementPresentByXpath("//div[contains(.,'Document Description (Description) is a required field.')]/img[@alt='error']");
waitAndTypeByXpath(DOC_DESCRIPTION_XPATH, "Adding Permission removeme");
waitAndClickSubmit();
waitForPageToLoad();
assertElementPresentByXpath("//div[@class='error']");
assertElementPresentByXpath("//div[contains(.,'Template (Template) is a required field.')]/img[@alt='error']");
assertElementPresentByXpath("//div[contains(.,'Permission Namespace (Permission Namespace) is a required field.')]/img[@alt='error']");
assertElementPresentByXpath("//div[contains(.,'Permission Name (Permission Name) is a required field.')]/img[@alt='error']");
selectOptionByName("document.newMaintainableObject.templateId", "36");
selectOptionByName("document.newMaintainableObject.namespaceCode", "KR-SYS");
permissionName = "removeme" + ITUtil.createUniqueDtsPlusTwoRandomChars();
waitAndTypeByName("document.newMaintainableObject.name", permissionName);
waitAndTypeByName("document.newMaintainableObject.description", "namespaceCode=KR*");
checkByName("document.newMaintainableObject.active");
waitAndClickSave();
waitForPageToLoad();
assertElementPresentByXpath(SAVE_SUCCESSFUL_XPATH);
SeleneseTestBase.assertEquals(DOC_STATUS_SAVED, getTextByXpath(DOC_STATUS_XPATH));
waitAndClickSubmit();
waitForPageToLoad();
assertElementPresentByXpath(DOC_SUBMIT_SUCCESS_MSG_XPATH,"Document is not submitted successfully");
SeleneseTestBase.assertEquals(DOC_STATUS_ENROUTE, getTextByXpath(DOC_STATUS_XPATH));
List<String> params = new ArrayList<String>();
params.add(docId);
params.add(permissionName);
return params;
}
示例14: testVerifyCopyParameterType
import com.thoughtworks.selenium.SeleneseTestBase; //导入方法依赖的package包/类
protected List<String> testVerifyCopyParameterType(String docId, String parameterType, String parameterCode) throws Exception
{
performParameterInquiry(parameterType);
SeleneseTestBase.assertEquals(parameterType, getTextByXpath("//div[@class='tab-container']/table//span[@id='name.div']").trim().toLowerCase());
waitAndClickCloseWindow();
switchToWindow("null");
List<String> params = new ArrayList<String>();
params.add(docId);
params.add(parameterType);
params.add(parameterCode);
return params;
}
示例15: testVerifyAddDeleteNoteLegacy
import com.thoughtworks.selenium.SeleneseTestBase; //导入方法依赖的package包/类
protected void testVerifyAddDeleteNoteLegacy() throws Exception {
selectFrameIframePortlet();
waitAndClick("div.tableborders.wrap.uif-boxLayoutVerticalItem.clearfix span.uif-headerText-span > img.uif-disclosure-image");
waitForElementPresent("button[title='Add a Note'].uif-action.uif-primaryActionButton.uif-smallActionButton");
waitAndClickByName("newCollectionLines['document.notes'].noteText");
waitAndTypeByName("newCollectionLines['document.notes'].noteText", "Test note");
waitAndClick("button[title='Add a Note'].uif-action.uif-primaryActionButton.uif-smallActionButton");
// waitForElementPresentByName("document.notes[0].noteText");
SeleneseTestBase.assertEquals("Test note", getTextByXpath("//pre"));
waitAndClick("button[title='Delete a Note'].uif-action.uif-primaryActionButton.uif-smallActionButton");
SeleneseTestBase.assertEquals(Boolean.FALSE, (Boolean) isElementPresentByName("document.notes[0].noteText"));
passed();
}