Skip to content

Commit 009260c

Browse files
committed
ignoring phantomjs 2.1 python cookie tests due to ariya/phantomjs#14047
1 parent 8ca0979 commit 009260c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

py/test/selenium/webdriver/common/cookie_tests.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,16 @@ def tearDown(self):
3838
self.driver.delete_all_cookies()
3939

4040
def testAddCookie(self):
41+
if self.driver.capabilities['browserName'] == 'phantomjs' and self.driver.capabilities['version'].startswith('2.1'):
42+
pytest.xfail("phantomjs driver 2.1 broke adding cookies")
4143
self.driver.execute_script("return document.cookie")
4244
self.driver.add_cookie(self.COOKIE_A)
4345
cookie_returned = str(self.driver.execute_script("return document.cookie"))
4446
self.assertTrue(self.COOKIE_A["name"] in cookie_returned)
4547

4648
def testAddingACookieThatExpiredInThePast(self):
49+
if self.driver.capabilities['browserName'] == 'phantomjs' and self.driver.capabilities['version'].startswith('2.1'):
50+
pytest.xfail("phantomjs driver 2.1 broke adding cookies")
4751
if self.driver.name == 'internet explorer':
4852
pytest.skip("Issue needs investigating")
4953
cookie = self.COOKIE_A.copy()
@@ -54,11 +58,15 @@ def testAddingACookieThatExpiredInThePast(self):
5458

5559

5660
def testDeleteAllCookie(self):
61+
if self.driver.capabilities['browserName'] == 'phantomjs' and self.driver.capabilities['version'].startswith('2.1'):
62+
pytest.xfail("phantomjs driver 2.1 broke adding cookies")
5763
self.driver.add_cookie(utils.convert_cookie_to_json(self.COOKIE_A))
5864
self.driver.delete_all_cookies()
5965
self.assertFalse(self.driver.get_cookies())
6066

6167
def testDeleteCookie(self):
68+
if self.driver.capabilities['browserName'] == 'phantomjs' and self.driver.capabilities['version'].startswith('2.1'):
69+
pytest.xfail("phantomjs driver 2.1 broke adding cookies")
6270
self.driver.add_cookie(utils.convert_cookie_to_json(self.COOKIE_A))
6371
self.driver.delete_cookie("foo")
6472
self.assertFalse(self.driver.get_cookies())
@@ -71,6 +79,8 @@ def testShouldGetCookieByName(self):
7179
self.assertEquals("set", cookie["value"])
7280

7381
def testGetAllCookies(self):
82+
if self.driver.capabilities['browserName'] == 'phantomjs' and self.driver.capabilities['version'].startswith('2.1'):
83+
pytest.xfail("phantomjs driver 2.1 broke adding cookies")
7484
key1 = "key_%d" % int(random.random()*10000000)
7585
key2 = "key_%d" % int(random.random()*10000000)
7686

@@ -90,6 +100,8 @@ def testGetAllCookies(self):
90100
self.assertEquals(count + 2, len(cookies))
91101

92102
def testShouldNotDeleteCookiesWithASimilarName(self):
103+
if self.driver.capabilities['browserName'] == 'phantomjs' and self.driver.capabilities['version'].startswith('2.1'):
104+
pytest.xfail("phantomjs driver 2.1 broke adding cookies")
93105
cookieOneName = "fish"
94106
cookie1 = {"name" :cookieOneName,
95107
"value":"cod"}

0 commit comments

Comments
 (0)