Skip to content

Commit bd3e7a7

Browse files
committed
[py] remove phantomjs from test suite
1 parent b3daa03 commit bd3e7a7

19 files changed

+3
-184
lines changed

py/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
'Firefox',
4242
'Ie',
4343
'Marionette',
44-
'PhantomJS',
4544
'Remote',
4645
'Safari',
4746
'WebKitGTK',

py/docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The `selenium` package is used to automate web browser interaction from Python.
2121
| **IRC**: | **#selenium** channel on freenode |
2222
+-----------+--------------------------------------------------------------------------------------+
2323

24-
Several browsers/drivers are supported (Firefox, Chrome, Internet Explorer, PhantomJS), as well as the Remote protocol.
24+
Several browsers/drivers are supported (Firefox, Chrome, Internet Explorer), as well as the Remote protocol.
2525

2626
Supported Python Versions
2727
=========================

py/test/selenium/webdriver/common/alerts_tests.py

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ def testShouldBeAbleToOverrideTheWindowAlertMethod(driver, pages):
5757
raise e
5858

5959

60-
@pytest.mark.xfail_phantomjs(
61-
reason='https://github.com/detro/ghostdriver/issues/20',
62-
raises=WebDriverException)
6360
@pytest.mark.xfail_chrome(
6461
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500')
6562
def testShouldAllowUsersToAcceptAnAlertManually(driver, pages):
@@ -71,9 +68,6 @@ def testShouldAllowUsersToAcceptAnAlertManually(driver, pages):
7168
assert "Testing Alerts" == driver.title
7269

7370

74-
@pytest.mark.xfail_phantomjs(
75-
reason='https://github.com/detro/ghostdriver/issues/20',
76-
raises=WebDriverException)
7771
@pytest.mark.xfail_chrome(
7872
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500')
7973
def testShouldAllowUsersToAcceptAnAlertWithNoTextManually(driver, pages):
@@ -86,9 +80,6 @@ def testShouldAllowUsersToAcceptAnAlertWithNoTextManually(driver, pages):
8680
assert "Testing Alerts" == driver.title
8781

8882

89-
@pytest.mark.xfail_phantomjs(
90-
reason='https://github.com/detro/ghostdriver/issues/20',
91-
raises=WebDriverException)
9283
@pytest.mark.xfail_chrome(
9384
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500')
9485
def testShouldGetTextOfAlertOpenedInSetTimeout(driver, pages):
@@ -109,9 +100,6 @@ def testShouldGetTextOfAlertOpenedInSetTimeout(driver, pages):
109100
@pytest.mark.xfail_chrome(
110101
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=26 and https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500',
111102
run=False)
112-
@pytest.mark.xfail_phantomjs(
113-
reason='https://github.com/detro/ghostdriver/issues/20',
114-
raises=WebDriverException)
115103
def testShouldAllowUsersToDismissAnAlertManually(driver, pages):
116104
pages.load("alerts.html")
117105
driver.find_element(by=By.ID, value="alert").click()
@@ -121,9 +109,6 @@ def testShouldAllowUsersToDismissAnAlertManually(driver, pages):
121109
assert "Testing Alerts" == driver.title
122110

123111

124-
@pytest.mark.xfail_phantomjs(
125-
reason='https://github.com/detro/ghostdriver/issues/20',
126-
raises=WebDriverException)
127112
@pytest.mark.xfail_chrome(
128113
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500')
129114
def testShouldAllowAUserToAcceptAPrompt(driver, pages):
@@ -136,9 +121,6 @@ def testShouldAllowAUserToAcceptAPrompt(driver, pages):
136121
assert "Testing Alerts" == driver.title
137122

138123

139-
@pytest.mark.xfail_phantomjs(
140-
reason='https://github.com/detro/ghostdriver/issues/20',
141-
raises=WebDriverException)
142124
@pytest.mark.xfail_chrome(
143125
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500')
144126
def testShouldAllowAUserToDismissAPrompt(driver, pages):
@@ -153,9 +135,6 @@ def testShouldAllowAUserToDismissAPrompt(driver, pages):
153135

154136
@pytest.mark.xfail_chrome(
155137
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500')
156-
@pytest.mark.xfail_phantomjs(
157-
reason='https://github.com/detro/ghostdriver/issues/20',
158-
raises=WebDriverException)
159138
def testShouldAllowAUserToSetTheValueOfAPrompt(driver, pages):
160139
pages.load("alerts.html")
161140
driver.find_element(by=By.ID, value="prompt").click()
@@ -169,9 +148,6 @@ def testShouldAllowAUserToSetTheValueOfAPrompt(driver, pages):
169148

170149
@pytest.mark.xfail_chrome(
171150
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1353')
172-
@pytest.mark.xfail_phantomjs(
173-
reason='https://github.com/detro/ghostdriver/issues/20',
174-
raises=WebDriverException)
175151
def testSettingTheValueOfAnAlertThrows(driver, pages):
176152
pages.load("alerts.html")
177153
driver.find_element(By.ID, "alert").click()
@@ -186,9 +162,6 @@ def testSettingTheValueOfAnAlertThrows(driver, pages):
186162
condition=sys.platform == 'darwin',
187163
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=26',
188164
run=False)
189-
@pytest.mark.xfail_phantomjs(
190-
reason='https://github.com/detro/ghostdriver/issues/20',
191-
raises=WebDriverException)
192165
def testAlertShouldNotAllowAdditionalCommandsIfDimissed(driver, pages):
193166
pages.load("alerts.html")
194167
driver.find_element(By.ID, "alert").click()
@@ -200,9 +173,6 @@ def testAlertShouldNotAllowAdditionalCommandsIfDimissed(driver, pages):
200173
alert.text
201174

202175

203-
@pytest.mark.xfail_phantomjs(
204-
reason='https://github.com/detro/ghostdriver/issues/20',
205-
raises=WebDriverException)
206176
@pytest.mark.xfail_chrome(
207177
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500')
208178
@pytest.mark.xfail_marionette(reason='Fails on travis')
@@ -217,9 +187,6 @@ def testShouldAllowUsersToAcceptAnAlertInAFrame(driver, pages):
217187
assert "Testing Alerts" == driver.title
218188

219189

220-
@pytest.mark.xfail_phantomjs(
221-
reason='https://github.com/detro/ghostdriver/issues/20',
222-
raises=WebDriverException)
223190
@pytest.mark.xfail_chrome(
224191
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500')
225192
@pytest.mark.xfail_marionette(reason='Fails on travis')
@@ -241,9 +208,6 @@ def testShouldThrowAnExceptionIfAnAlertHasNotBeenDealtWithAndDismissTheAlert():
241208
# //TODO(David) Complete this test
242209

243210

244-
@pytest.mark.xfail_phantomjs(
245-
reason='https://github.com/detro/ghostdriver/issues/20',
246-
raises=WebDriverException)
247211
@pytest.mark.xfail_chrome(
248212
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500')
249213
def testPromptShouldUseDefaultValueIfNoKeysSent(driver, pages):
@@ -257,9 +221,6 @@ def testPromptShouldUseDefaultValueIfNoKeysSent(driver, pages):
257221
assert "This is a default value" == txt
258222

259223

260-
@pytest.mark.xfail_phantomjs(
261-
reason='https://github.com/detro/ghostdriver/issues/20',
262-
raises=WebDriverException)
263224
@pytest.mark.xfail_chrome(
264225
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500')
265226
def testPromptShouldHaveNullValueIfDismissed(driver, pages):
@@ -271,9 +232,6 @@ def testPromptShouldHaveNullValueIfDismissed(driver, pages):
271232
assert "null" == driver.find_element(By.ID, "text").text
272233

273234

274-
@pytest.mark.xfail_phantomjs(
275-
reason='https://github.com/detro/ghostdriver/issues/20',
276-
raises=WebDriverException)
277235
@pytest.mark.xfail_chrome(
278236
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500')
279237
def testHandlesTwoAlertsFromOneInteraction(driver, pages):
@@ -293,9 +251,6 @@ def testHandlesTwoAlertsFromOneInteraction(driver, pages):
293251
assert driver.find_element(By.ID, "text2").text == "cheddar"
294252

295253

296-
@pytest.mark.xfail_phantomjs(
297-
reason='https://github.com/detro/ghostdriver/issues/20',
298-
raises=WebDriverException)
299254
@pytest.mark.xfail_chrome(
300255
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500')
301256
def testShouldHandleAlertOnPageLoad(driver, pages):
@@ -307,9 +262,6 @@ def testShouldHandleAlertOnPageLoad(driver, pages):
307262
assert "onload" == value
308263

309264

310-
@pytest.mark.xfail_phantomjs(
311-
reason='https://github.com/detro/ghostdriver/issues/20',
312-
raises=WebDriverException)
313265
def testShouldHandleAlertOnPageLoadUsingGet(driver, pages):
314266
pages.load("pageWithOnLoad.html")
315267
alert = _waitForAlert(driver)
@@ -320,9 +272,6 @@ def testShouldHandleAlertOnPageLoadUsingGet(driver, pages):
320272
WebDriverWait(driver, 3).until(EC.text_to_be_present_in_element((By.TAG_NAME, "p"), "Page with onload event handler"))
321273

322274

323-
@pytest.mark.xfail_phantomjs(
324-
reason='https://github.com/detro/ghostdriver/issues/20',
325-
raises=WebDriverException)
326275
@pytest.mark.xfail_chrome(
327276
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500')
328277
def testShouldHandleAlertOnPageBeforeUnload(driver, pages):
@@ -341,9 +290,6 @@ def testShouldHandleAlertOnPageBeforeUnload(driver, pages):
341290
WebDriverWait(driver, 3).until(EC.title_is("Testing Alerts"))
342291

343292

344-
@pytest.mark.xfail_phantomjs(
345-
reason='https://github.com/detro/ghostdriver/issues/20',
346-
raises=WebDriverException)
347293
@pytest.mark.xfail_chrome(
348294
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500')
349295
def _testShouldHandleAlertOnPageBeforeUnloadAtQuit(driver, pages):
@@ -358,9 +304,6 @@ def _testShouldHandleAlertOnPageBeforeUnloadAtQuit(driver, pages):
358304
driver.quit()
359305

360306

361-
@pytest.mark.xfail_phantomjs(
362-
reason='https://github.com/detro/ghostdriver/issues/20',
363-
raises=WebDriverException)
364307
@pytest.mark.xfail_chrome(
365308
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500')
366309
def testShouldAllowTheUserToGetTheTextOfAnAlert(driver, pages):
@@ -374,9 +317,6 @@ def testShouldAllowTheUserToGetTheTextOfAnAlert(driver, pages):
374317

375318
@pytest.mark.xfail_chrome(
376319
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500')
377-
@pytest.mark.xfail_phantomjs(
378-
reason='https://github.com/detro/ghostdriver/issues/20',
379-
raises=WebDriverException)
380320
def testShouldAllowTheUserToGetTheTextOfAPrompt(driver, pages):
381321
pages.load("alerts.html")
382322
driver.find_element(By.ID, "prompt").click()
@@ -388,9 +328,6 @@ def testShouldAllowTheUserToGetTheTextOfAPrompt(driver, pages):
388328
assert "Enter something" == value
389329

390330

391-
@pytest.mark.xfail_phantomjs(
392-
reason='https://github.com/detro/ghostdriver/issues/20',
393-
raises=WebDriverException)
394331
@pytest.mark.xfail_chrome(
395332
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500')
396333
def testAlertShouldNotAllowAdditionalCommandsIfDismissed(driver, pages):
@@ -408,9 +345,6 @@ def testAlertShouldNotAllowAdditionalCommandsIfDismissed(driver, pages):
408345
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1537')
409346
@pytest.mark.xfail_marionette(
410347
reason='https://bugzilla.mozilla.org/show_bug.cgi?id=1279211')
411-
@pytest.mark.xfail_phantomjs(
412-
reason='https://github.com/detro/ghostdriver/issues/20',
413-
raises=WebDriverException)
414348
def testUnexpectedAlertPresentExceptionContainsAlertText(driver, pages):
415349
pages.load("alerts.html")
416350
driver.find_element(by=By.ID, value="alert").click()

py/test/selenium/webdriver/common/api_example_tests.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,6 @@ def testIsElementDisplayed(driver, pages):
254254
assert not not_visible
255255

256256

257-
@pytest.mark.xfail_phantomjs(
258-
reason='https://github.com/detro/ghostdriver/issues/466')
259257
def testMoveWindowPosition(driver, pages):
260258
pages.load("blank.html")
261259
loc = driver.get_window_position()

py/test/selenium/webdriver/common/appcache_tests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
@pytest.mark.xfail_chrome
2525
@pytest.mark.xfail_marionette(raises=WebDriverException)
26-
@pytest.mark.xfail_phantomjs(raises=WebDriverException)
2726
@pytest.mark.xfail_remote
2827
def testWeCanGetTheStatusOfTheAppCache(driver, pages):
2928
pages.load('html5Page')

py/test/selenium/webdriver/common/driver_element_finding_tests.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,12 @@ def test_Should_Not_Be_Able_To_Locate_By_Id_Multiple_Elements_That_Do_Not_Exist(
7272
assert len(elements) == 0
7373

7474

75-
@pytest.mark.xfail_phantomjs(raises=NoSuchWindowException)
7675
def test_Finding_ASingle_Element_By_Empty_Id_Should_Throw(driver, pages):
7776
pages.load("formPage.html")
7877
with pytest.raises(NoSuchElementException):
7978
driver.find_element(By.ID, "")
8079

8180

82-
@pytest.mark.xfail_phantomjs(raises=NoSuchElementException)
8381
def test_Finding_Multiple_Elements_By_Empty_Id_Should_Return_Empty_List(driver, pages):
8482
pages.load("formPage.html")
8583
elements = driver.find_elements(By.ID, "")
@@ -132,14 +130,12 @@ def test_Should_Not_Be_Able_To_Locate_By_Name_Multiple_Elements_That_Do_Not_Exis
132130
assert len(elements) == 0
133131

134132

135-
@pytest.mark.xfail_phantomjs(raises=NoSuchWindowException)
136133
def test_Finding_ASingle_Element_By_Empty_Name_Should_Throw(driver, pages):
137134
pages.load("formPage.html")
138135
with pytest.raises(NoSuchElementException):
139136
driver.find_element(By.NAME, "")
140137

141138

142-
@pytest.mark.xfail_phantomjs(raises=NoSuchElementException)
143139
def test_Finding_Multiple_Elements_By_Empty_Name_Should_Return_Empty_List(driver, pages):
144140
pages.load("formPage.html")
145141
elements = driver.find_elements(By.NAME, "")
@@ -188,7 +184,6 @@ def test_Should_Not_Be_Able_To_Locate_By_Tag_Name_Multiple_Elements_That_Do_Not_
188184

189185
@pytest.mark.xfail_chrome(
190186
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1541')
191-
@pytest.mark.xfail_phantomjs
192187
def test_Finding_ASingle_Element_By_Empty_Tag_Name_Should_Throw(driver, pages):
193188
pages.load("formPage.html")
194189
with pytest.raises(InvalidSelectorException):
@@ -197,7 +192,6 @@ def test_Finding_ASingle_Element_By_Empty_Tag_Name_Should_Throw(driver, pages):
197192

198193
@pytest.mark.xfail_chrome(
199194
reason='https://bugs.chromium.org/p/chromedriver/issues/detail?id=1541')
200-
@pytest.mark.xfail_phantomjs
201195
def test_Finding_Multiple_Elements_By_Empty_Tag_Name_Should_Throw(driver, pages):
202196
pages.load("formPage.html")
203197
with pytest.raises(InvalidSelectorException):
@@ -269,7 +263,6 @@ def test_Should_Not_Find_Element_By_Class_When_The_Name_Queried_Is_Shorter_Than_
269263
driver.find_element(By.CLASS_NAME, "name_B")
270264

271265

272-
@pytest.mark.xfail_phantomjs(raises=NoSuchWindowException)
273266
def test_Finding_ASingle_Element_By_Empty_Class_Name_Should_Throw(driver, pages):
274267
pages.load("xhtmlTest.html")
275268
with pytest.raises(NoSuchElementException):
@@ -282,21 +275,18 @@ def test_Finding_Multiple_Elements_By_Empty_Class_Name_Should_Throw(driver, page
282275
driver.find_elements(By.CLASS_NAME, "")
283276

284277

285-
@pytest.mark.xfail_phantomjs(raises=WebDriverException)
286278
def test_Finding_ASingle_Element_By_Compound_Class_Name_Should_Throw(driver, pages):
287279
pages.load("xhtmlTest.html")
288280
with pytest.raises(NoSuchElementException):
289281
driver.find_element(By.CLASS_NAME, "a b")
290282

291283

292-
@pytest.mark.xfail_phantomjs(raises=InvalidElementStateException)
293284
def test_Finding_ASingle_Element_By_Invalid_Class_Name_Should_Throw(driver, pages):
294285
pages.load("xhtmlTest.html")
295286
with pytest.raises(NoSuchElementException):
296287
driver.find_element(By.CLASS_NAME, "!@#$%^&*")
297288

298289

299-
@pytest.mark.xfail_phantomjs(raises=InvalidElementStateException)
300290
def test_Finding_Multiple_Elements_By_Invalid_Class_Name_Should_Throw(driver, pages):
301291
pages.load("xhtmlTest.html")
302292
with pytest.raises(NoSuchElementException):
@@ -356,7 +346,6 @@ def test_Finding_ALink_By_Xpath_Using_Contains_Keyword_Should_Work(driver, pages
356346
@pytest.mark.xfail_firefox(raises=InvalidSelectorException)
357347
@pytest.mark.xfail_remote(raises=InvalidSelectorException)
358348
@pytest.mark.xfail_marionette(raises=WebDriverException)
359-
@pytest.mark.xfail_phantomjs(raises=InvalidSelectorException)
360349
@pytest.mark.xfail_safari(raises=NoSuchElementException)
361350
@pytest.mark.xfail_webkitgtk(raises=InvalidSelectorException)
362351
def test_Should_Be_Able_To_Find_Element_By_XPath_With_Namespace(driver, pages):
@@ -493,7 +482,6 @@ def test_Should_Not_Find_Elements_By_Css_Selector_When_There_Is_No_Such_Element(
493482
assert len(elements) == 0
494483

495484

496-
@pytest.mark.xfail_phantomjs(raises=NoSuchWindowException)
497485
def test_Finding_ASingle_Element_By_Empty_Css_Selector_Should_Throw(driver, pages):
498486
pages.load("xhtmlTest.html")
499487
with pytest.raises(NoSuchElementException):
@@ -506,14 +494,12 @@ def test_Finding_Multiple_Elements_By_Empty_Css_Selector_Should_Throw(driver, pa
506494
driver.find_elements(By.CSS_SELECTOR, "")
507495

508496

509-
@pytest.mark.xfail_phantomjs(raises=InvalidElementStateException)
510497
def test_Finding_ASingle_Element_By_Invalid_Css_Selector_Should_Throw(driver, pages):
511498
pages.load("xhtmlTest.html")
512499
with pytest.raises(NoSuchElementException):
513500
driver.find_element(By.CSS_SELECTOR, "//a/b/c[@id='1']")
514501

515502

516-
@pytest.mark.xfail_phantomjs(raises=InvalidElementStateException)
517503
def test_Finding_Multiple_Elements_By_Invalid_Css_Selector_Should_Throw(driver, pages):
518504
pages.load("xhtmlTest.html")
519505
with pytest.raises(NoSuchElementException):

py/test/selenium/webdriver/common/executing_async_javascript_tests.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,13 @@ def testShouldBeAbleToReturnArraysOfWebElementsFromAsyncScripts(driver, pages):
100100
# assert list_[0] == list_[1]
101101

102102

103-
@pytest.mark.xfail_phantomjs(run=False)
104103
def testShouldTimeoutIfScriptDoesNotInvokeCallback(driver, pages):
105104
pages.load("ajaxy_page.html")
106105
with pytest.raises(TimeoutException):
107106
# Script is expected to be async and explicitly callback, so this should timeout.
108107
driver.execute_async_script("return 1 + 2;")
109108

110109

111-
@pytest.mark.xfail_phantomjs(run=False)
112110
def testShouldTimeoutIfScriptDoesNotInvokeCallbackWithAZeroTimeout(driver, pages):
113111
pages.load("ajaxy_page.html")
114112
with pytest.raises(TimeoutException):

0 commit comments

Comments
 (0)