Changes for timing errors on elements and more robust XPaths.

svn path=/trunk/qa/; revision=138774
This commit is contained in:
Marc E. Christensen 2009-07-27 21:48:09 +00:00
Родитель 3034adebb7
Коммит 7b71204255
2 изменённых файлов: 7 добавлений и 9 удалений

Просмотреть файл

@ -21,7 +21,7 @@ class be_0400_createUserTest(apacheTestCase):
sel.type("ctl00_cphBody_Login1_Password", "admin")
sel.click("ctl00_cphBody_Login1_LoginButton")
sel.wait_for_page_to_load("30000")
sel.click("//ul[@id='ctl00_42fcbe7c2c9c440abad965a94472fccc_uxMenu_ulMenu']/li[9]/a/span")
sel.click("//a/span[text()='Users']")
sel.wait_for_page_to_load("30000")
sel.type("ctl00_cphAdmin_CreateUserWizard1_ctl02_UserName", "mono user")
sel.type("ctl00_cphAdmin_CreateUserWizard1_ctl02_Password", "mono")
@ -29,9 +29,7 @@ class be_0400_createUserTest(apacheTestCase):
sel.type("ctl00_cphAdmin_CreateUserWizard1_ctl02_Email", "mono@example.com")
sel.click("ctl00_cphAdmin_CreateUserWizard1_CustomNavContainer0_StepNextButtonButton")
sel.wait_for_page_to_load("30000")
sel.click("link=Logout")
sel.wait_for_page_to_load("30000")
except Exception,e:
self.verificationErrors.append(str(e))

Просмотреть файл

@ -24,25 +24,25 @@ class be_1200_cleanUpTest(apacheTestCase):
mono.log("Delete Mono Story 2")
sel.click("link=Mono Story 2")
sel.wait_for_page_to_load("30000")
sel.click("//html/body/form/div[2]/div[2]/div[3]/a[2]")
sel.click("//html/body/form//div[3]/a[text()='Delete']")
self.failUnless(re.search(r"^Are you sure you want to delete the post[\s\S]$", sel.get_confirmation()))
############
mono.log("Delete Mono Story")
for i in range(60):
try:
if sel.is_element_present("link=Mono Story"): break
except: pass
time.sleep(1)
else: self.fail("time out")
############
mono.log("Delete Mono Story")
sel.click("link=Mono Story")
sel.wait_for_page_to_load("30000")
for i in range(60):
try:
if sel.is_element_present("//html/body/form/div[2]/div[2]/div[3]/a[2]"): break
if sel.is_element_present("//html/body/form//div[3]/a[text()='Delete']"): break
except: pass
time.sleep(1)
else: self.fail("time out")
sel.click("//html/body/form/div[2]/div[2]/div[3]/a[2]")
sel.click("//html/body/form//div[3]/a[text()='Delete']")
self.failUnless(re.search(r"^Are you sure you want to delete the post[\s\S]$", sel.get_confirmation()))
############
mono.log("Delete Mono category")