From 7d5b8b1fa946a966f105931ed380c92b49228dd1 Mon Sep 17 00:00:00 2001 From: AutomatedTester Date: Mon, 18 Jan 2016 21:12:59 +0000 Subject: [PATCH] Ignoring PhantomJS tests in element finding --- .../common/driver_element_finding_tests.py | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/py/test/selenium/webdriver/common/driver_element_finding_tests.py b/py/test/selenium/webdriver/common/driver_element_finding_tests.py index ed1734439e11e..8112bf8e8c0e9 100755 --- a/py/test/selenium/webdriver/common/driver_element_finding_tests.py +++ b/py/test/selenium/webdriver/common/driver_element_finding_tests.py @@ -59,7 +59,7 @@ def test_Should_Not_Be_Able_To_Locate_By_Id_Multiple_Elements_That_Do_Not_Exist( elements = self.driver.find_elements(By.ID, "non_Existent_Button") self.assertEqual(len(elements), 0) - #Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504") + @pytest.mark.ignore_phantomjs def test_Finding_ASingle_Element_By_Empty_Id_Should_Throw(self): self._load_page("formPage") try: @@ -68,7 +68,7 @@ def test_Finding_ASingle_Element_By_Empty_Id_Should_Throw(self): except NoSuchElementException: pass - #Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504") + @pytest.mark.ignore_phantomjs def test_Finding_Multiple_Elements_By_Empty_Id_Should_Return_Empty_List(self): self._load_page("formPage") elements = self.driver.find_elements(By.ID, "") @@ -119,7 +119,7 @@ def test_Should_Not_Be_Able_To_Locate_By_Name_Multiple_Elements_That_Do_Not_Exis elements = self.driver.find_elements(By.NAME, "non_Existent_Button") self.assertEqual(len(elements), 0) - #@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504") + @pytest.mark.ignore_phantomjs def test_Finding_ASingle_Element_By_Empty_Name_Should_Throw(self): self._load_page("formPage") try: @@ -128,7 +128,7 @@ def test_Finding_ASingle_Element_By_Empty_Name_Should_Throw(self): except NoSuchElementException: pass - #Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504") + @pytest.mark.ignore_phantomjs def test_Finding_Multiple_Elements_By_Empty_Name_Should_Return_Empty_List(self): self._load_page("formPage") elements = self.driver.find_elements(By.NAME, "") @@ -176,7 +176,7 @@ def test_Should_Not_Be_Able_To_Locate_By_Tag_Name_Multiple_Elements_That_Do_Not_ elements = self.driver.find_elements(By.TAG_NAME, "non_Existent_Button") self.assertEqual(len(elements), 0) - #Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504") + @pytest.mark.ignore_phantomjs def test_Finding_ASingle_Element_By_Empty_Tag_Name_Should_Throw(self): self._load_page("formPage") try: @@ -185,7 +185,7 @@ def test_Finding_ASingle_Element_By_Empty_Tag_Name_Should_Throw(self): except NoSuchElementException: pass - #Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504") + @pytest.mark.ignore_phantomjs def test_Finding_Multiple_Elements_By_Empty_Tag_Name_Should_Return_Empty_List(self): self._load_page("formPage") elements = self.driver.find_elements(By.TAG_NAME, "") @@ -252,7 +252,7 @@ def test_Should_Not_Find_Element_By_Class_When_The_Name_Queried_Is_Shorter_Than_ except NoSuchElementException: pass - #Ignore(value = {CHROME, MARIONETTE}, reason = "throws Webself.driver_Exception") + @pytest.mark.ignore_phantomjs def test_Finding_ASingle_Element_By_Empty_Class_Name_Should_Throw(self): self._load_page("xhtmlTest") try: @@ -261,7 +261,7 @@ def test_Finding_ASingle_Element_By_Empty_Class_Name_Should_Throw(self): except NoSuchElementException: pass - #Ignore(value = {CHROME, MARIONETTE}, reason = "Chrome: throws Webself.driver_Exception") + @pytest.mark.ignore_phantomjs def test_Finding_Multiple_Elements_By_Empty_Class_Name_Should_Throw(self): self._load_page("xhtmlTest") try: @@ -270,6 +270,7 @@ def test_Finding_Multiple_Elements_By_Empty_Class_Name_Should_Throw(self): except NoSuchElementException: pass + @pytest.mark.ignore_phantomjs def test_Finding_ASingle_Element_By_Compound_Class_Name_Should_Throw(self): self._load_page("xhtmlTest") try: @@ -278,7 +279,7 @@ def test_Finding_ASingle_Element_By_Compound_Class_Name_Should_Throw(self): except NoSuchElementException: pass - #Ignore(value = {CHROME, MARIONETTE}, reason = "Chrome: throws Webself.driver_Exception") + @pytest.mark.ignore_phantomjs def test_Finding_Multiple_Elements_By_Compound_Class_Name_Should_Throw(self): self._load_page("xhtmlTest") try: @@ -287,7 +288,7 @@ def test_Finding_Multiple_Elements_By_Compound_Class_Name_Should_Throw(self): except NoSuchElementException: pass - #Ignore(value = {CHROME, MARIONETTE}, reason = "Chrome: throws Invalid_Element_State_Exception") + @pytest.mark.ignore_phantomjs def test_Finding_ASingle_Element_By_Invalid_Class_Name_Should_Throw(self): self._load_page("xhtmlTest") try: @@ -296,7 +297,7 @@ def test_Finding_ASingle_Element_By_Invalid_Class_Name_Should_Throw(self): except NoSuchElementException: pass - #Ignore(value = {CHROME, MARIONETTE}, reason = "Chrome: throws Invalid_Element_State_Exception") + @pytest.mark.ignore_phantomjs def test_Finding_Multiple_Elements_By_Invalid_Class_Name_Should_Throw(self): self._load_page("xhtmlTest") try: @@ -349,6 +350,7 @@ def test_Finding_ALink_By_Xpath_Using_Contains_Keyword_Should_Work(self): @pytest.mark.ignore_firefox @pytest.mark.ignore_marionette + @pytest.mark.ignore_phantomjs def test_Should_Be_Able_To_Find_Element_By_XPath_With_Namespace(self): self._load_page("svgPage") element = self.driver.find_element(By.XPATH, "//svg:svg//svg:text") @@ -356,6 +358,7 @@ def test_Should_Be_Able_To_Find_Element_By_XPath_With_Namespace(self): @pytest.mark.ignore_firefox @pytest.mark.ignore_marionette + @pytest.mark.ignore_phantomjs def test_Should_Be_Able_To_Find_Element_By_XPath_In_Xml_Document(self): self._load_page("simpleXmlDocument") element = self.driver.find_element(By.XPATH, "//foo") @@ -505,8 +508,7 @@ def test_Should_Not_Find_Elements_By_Css_Selector_When_There_Is_No_Such_Element( elements = self.driver.find_elements(By.CSS_SELECTOR, ".there-is-no-such-class") self.assertEqual(len(elements), 0) - #Ignore(value = {CHROME, MARIONETTE}, - # reason = "Chrome: throws Webself.driver_Exception, Marionette: throws Invalid_Element_State_Exception") + @pytest.mark.ignore_phantomjs def test_Finding_ASingle_Element_By_Empty_Css_Selector_Should_Throw(self): self._load_page("xhtmlTest") try: @@ -515,8 +517,7 @@ def test_Finding_ASingle_Element_By_Empty_Css_Selector_Should_Throw(self): except NoSuchElementException: pass - #Ignore(value = {CHROME, MARIONETTE}, - # reason = "Chrome: throws Webself.driver_Exception, Marionette: throws Invalid_Element_State_Exception") + @pytest.mark.ignore_phantomjs def test_Finding_Multiple_Elements_By_Empty_Css_Selector_Should_Throw(self): self._load_page("xhtmlTest") try: @@ -525,7 +526,7 @@ def test_Finding_Multiple_Elements_By_Empty_Css_Selector_Should_Throw(self): except NoSuchElementException: pass - #Ignore(value = {CHROME, MARIONETTE} reason = "Chrome: throws Invalid_Element_State_Exception, Marionette: throws Invalid_Element_State_Exception") + @pytest.mark.ignore_phantomjs def test_Finding_ASingle_Element_By_Invalid_Css_Selector_Should_Throw(self): self._load_page("xhtmlTest") try: @@ -534,7 +535,7 @@ def test_Finding_ASingle_Element_By_Invalid_Css_Selector_Should_Throw(self): except NoSuchElementException: pass - #Ignore(value = {CHROME, MARIONETTE}, reason = "Chrome: throws Invalid_Element_State_Exception, Marionette: throws Invalid_Element_State_Exception") + @pytest.mark.ignore_phantomjs def test_Finding_Multiple_Elements_By_Invalid_Css_Selector_Should_Throw(self): self._load_page("xhtmlTest") try: