def test_srd_sd_code_complexity_extendedsearchtab_tc(self): ccplx = [ "address alias level", "array address complexity", "array address complexity", "array length/limit complexity", "asynchronous", "bound violation", "buffer address type", "container", "data type", "index alias level", "local control flow", "loop complexity", "loop structure", "memory access", "memory location", "None/Other", "overflow magnitude", "overflow type", "pointer", ] for i in range(len(ccplx)): self.driver.get(self.base_url + "/search.php?extended&tree") el = self.driver.find_element_by_xpath("//select[@id='complex_sel']") common_sd_methods.select_option_dropdow(el, ccplx[i]) self.driver.find_element_by_xpath("//input[@name='Submit']").click() common_sd_methods.assert_title(self, self.driver, self.verificationErrors)
def test_download_srd_suites(self): driver = self.driver numOfTestCases = self.count_srd_suites(driver) i = 0 while(i < numOfTestCases): driver.find_element_by_xpath("//div[@id='content']/form/table/tbody/tr[%i]/td/a" %i).click() common_sd_methods.assert_title(self, driver, self.verificationErrors) i += 1
def test_srd_sd_bigstring_sourcecodesearchtab_tc(self): driver = self.driver driver.get(self.base_url + "/search.php?code") driver.find_element_by_xpath("//input[@id='function']").send_keys("I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text. I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text. I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text.") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back() driver.find_element_by_xpath("//input[@id='function']").send_keys("I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text. I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text. I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text.") driver.find_element_by_xpath("(//input[@name='precision'])[2]").click() driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back() driver.find_element_by_xpath("//input[@id='fileName']").send_keys("I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text. I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text. I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text.") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back() driver.find_element_by_xpath("//input[@id='fileName']").send_keys("I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text. I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text. I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text.") driver.find_element_by_xpath("//input[@name='searchNameByRegex']").click() driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back()
def test_srd_sd_bigstring_tc(self): driver = self.driver driver.get(self.base_url + "/search.php?simple") driver.find_element_by_xpath("//input[@name='reference']").send_keys("I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text. I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text. I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text.") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back() driver.find_element_by_xpath("//input[@name='description']").send_keys("I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text. I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text. I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text.") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back() driver.find_element_by_xpath("//input[@name='author']").send_keys("I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text. I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text. I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text.") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back() driver.find_element_by_xpath("//input[@name='contributor']").send_keys("I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text. I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text. I am typing in more than 500 characters of text to test whether the more than 500 characters are cut off or if they display correctly. 500 characters is a lot of text.") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back()
def test_srd_sd_nonascii_tc(self): driver = self.driver driver.get(self.base_url + "/search.php?simple") driver.find_element_by_xpath("//input[@name='reference']").send_keys(u"ñó? ä?çíì ??/?? ??/?? Huáy?; ?? Zh?ngwén ???????? Lech Wa??sa æøå") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back() driver.find_element_by_xpath("//input[@name='description']").send_keys(u"ñó? ä?çíì ??/?? ??/?? Huáy?; ?? Zh?ngwén ???????? Lech Wa??sa æøå") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back() driver.find_element_by_xpath("//input[@name='author']").send_keys(u"ñó? ä?çíì ??/?? ??/?? Huáy?; ?? Zh?ngwén ???????? Lech Wa??sa æøå") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back() driver.find_element_by_xpath("//input[@name='contributor']").send_keys(u"ñó? ä?çíì ??/?? ??/?? Huáy?; ?? Zh?ngwén ???????? Lech Wa??sa æøå") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back()
def test_srd_sd_nonascii_sourcecodesearchtab_tc(self): driver = self.driver driver.get(self.base_url + "/search.php?code") driver.find_element_by_xpath("//input[@id='function']").send_keys(u"ñó? ä?çíì ??/?? ??/?? Huáy?; ?? Zh?ngwén ???????? Lech Wa??sa æøå") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back() driver.find_element_by_xpath("//input[@id='function']").send_keys(u"ñó? ä?çíì ??/?? ??/?? Huáy?; ?? Zh?ngwén ???????? Lech Wa??sa æøå") driver.find_element_by_xpath("(//input[@name='precision'])[2]").click() driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back() driver.find_element_by_xpath("//input[@id='fileName']").send_keys(u"ñó? ä?çíì ??/?? ??/?? Huáy?; ?? Zh?ngwén ???????? Lech Wa??sa æøå") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(3) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back() driver.find_element_by_xpath("//input[@id='fileName']").send_keys(u"ñó? ä?çíì ??/?? ??/?? Huáy?; ?? Zh?ngwén ???????? Lech Wa??sa æøå") driver.find_element_by_xpath("//input[@name='searchNameByRegex']").click() driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back()
def test_search_download_light(self): driver = self.driver driver.get(self.base_url + "/index.php") driver.find_element_by_xpath("//a[contains(text(),'Search / Download')]").click() driver.find_element_by_xpath("//input[@name='reference']").send_keys("\"This sentence is wrapped in double quotes.\"") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back() driver.find_element_by_xpath("//input[@name='contributor']").send_keys(u"ñó? ä?çíì ??/?? ??/?? Huáy?; ?? Zh?ngwén ???????? Lech Wa??sa æøå") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back() driver.find_element_by_xpath("//a[contains(text(),'Extended Search')]").click() driver.find_element_by_xpath("//input[@name='reference']").send_keys("\"This sentence is wrapped in double quotes.\"") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back() driver.find_element_by_xpath("//input[@name='contributor']").send_keys(u"ñó? ä?çíì ??/?? ??/?? Huáy?; ?? Zh?ngwén ???????? Lech Wa??sa æøå") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back() driver.find_element_by_xpath("//a[contains(text(),'Source Code Search')]").click() driver.find_element_by_xpath("//input[@id='function']").send_keys("\"This sentence is wrapped in double quotes.\"") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors) driver.back() driver.find_element_by_xpath("//input[@id='fileName']").send_keys(u"ñó? ä?çíì ??/?? ??/?? Huáy?; ?? Zh?ngwén ???????? Lech Wa??sa æøå") driver.find_element_by_xpath("//input[@name='Submit']").click() time.sleep(2) common_sd_methods.assert_title(self, driver, self.verificationErrors)