Skip to content
This repository has been archived by the owner on Aug 12, 2021. It is now read-only.

Commit

Permalink
Ignoring PhantomJS tests in element finding
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomatedTester committed Jan 18, 2016
1 parent d1eb807 commit 7d5b8b1
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions py/test/selenium/webdriver/common/driver_element_finding_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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, "")
Expand Down Expand Up @@ -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:
Expand All @@ -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, "")
Expand Down Expand Up @@ -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:
Expand All @@ -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, "")
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -349,13 +350,15 @@ 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")
self.assertEqual(element.text, "Test Chart")

@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")
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 7d5b8b1

Please sign in to comment.