selenium-webdriver 3.5.0 → 4.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.md +246 -0
- package/LICENSE +1 -1
- package/NOTICE +1 -1
- package/README.md +40 -40
- package/chrome.js +118 -134
- package/edge.js +43 -117
- package/example/chrome_android.js +8 -9
- package/example/chrome_mobile_emulation.js +8 -9
- package/example/firefox_channels.js +23 -19
- package/example/google_search.js +3 -3
- package/example/google_search_test.js +38 -27
- package/example/{chrome_headless.js → headless.js} +15 -7
- package/example/logging.js +40 -7
- package/firefox.js +789 -0
- package/http/index.js +62 -9
- package/http/util.js +11 -6
- package/ie.js +83 -97
- package/index.js +198 -114
- package/io/exec.js +29 -15
- package/io/index.js +1 -1
- package/io/zip.js +1 -1
- package/lib/actions.js +68 -63
- package/lib/atoms/get-attribute.js +86 -0
- package/lib/atoms/is-displayed.js +76 -76
- package/lib/by.js +7 -4
- package/lib/capabilities.js +310 -210
- package/lib/command.js +27 -51
- package/lib/error.js +100 -41
- package/lib/http.js +161 -120
- package/lib/input.js +1044 -8
- package/lib/logging.js +1 -5
- package/lib/promise.js +222 -3331
- package/lib/proxy.js +134 -39
- package/lib/session.js +2 -2
- package/lib/symbols.js +0 -0
- package/lib/until.js +1 -1
- package/lib/webdriver.js +717 -953
- package/net/index.js +21 -25
- package/net/portprober.js +51 -68
- package/package.json +17 -12
- package/proxy.js +0 -0
- package/remote/index.js +63 -44
- package/safari.js +41 -128
- package/testing/index.js +386 -315
- package/.npmignore +0 -2
- package/example/async_await_test.js +0 -68
- package/example/google_search_generator.js +0 -50
- package/example/parallel_flows.js +0 -54
- package/firefox/binary.js +0 -344
- package/firefox/extension.js +0 -224
- package/firefox/index.js +0 -626
- package/firefox/profile.js +0 -394
- package/lib/README +0 -5
- package/lib/atoms/getAttribute.js +0 -9
- package/lib/devmode.js +0 -34
- package/lib/events.js +0 -210
- package/lib/firefox/webdriver.json +0 -70
- package/lib/test/build.js +0 -151
- package/lib/test/data/ClickTest_testClicksASurroundingStrongTag.html +0 -11
- package/lib/test/data/Page.aspx +0 -17
- package/lib/test/data/Page.aspx.cs +0 -22
- package/lib/test/data/Redirect.aspx +0 -11
- package/lib/test/data/Redirect.aspx.cs +0 -9
- package/lib/test/data/Settings.StyleCop +0 -759
- package/lib/test/data/Web.Config +0 -59
- package/lib/test/data/actualXhtmlPage.xhtml +0 -14
- package/lib/test/data/ajaxy_page.html +0 -81
- package/lib/test/data/alerts.html +0 -85
- package/lib/test/data/banner.gif +0 -0
- package/lib/test/data/beach.jpg +0 -0
- package/lib/test/data/blank.html +0 -1
- package/lib/test/data/bodyTypingTest.html +0 -41
- package/lib/test/data/booleanAttributes.html +0 -19
- package/lib/test/data/child/childPage.html +0 -8
- package/lib/test/data/child/grandchild/grandchildPage.html +0 -8
- package/lib/test/data/clickEventPage.html +0 -26
- package/lib/test/data/click_frames.html +0 -10
- package/lib/test/data/click_jacker.html +0 -38
- package/lib/test/data/click_out_of_bounds.html +0 -23
- package/lib/test/data/click_out_of_bounds_overflow.html +0 -85
- package/lib/test/data/click_rtl.html +0 -19
- package/lib/test/data/click_source.html +0 -18
- package/lib/test/data/click_tests/click_iframe.html +0 -6
- package/lib/test/data/click_tests/click_in_iframe.html +0 -8
- package/lib/test/data/click_tests/disabled_element.html +0 -12
- package/lib/test/data/click_tests/disappearing_element.html +0 -62
- package/lib/test/data/click_tests/google_map.html +0 -15
- package/lib/test/data/click_tests/google_map.png +0 -0
- package/lib/test/data/click_tests/html5_submit_buttons.html +0 -16
- package/lib/test/data/click_tests/issue5237.html +0 -9
- package/lib/test/data/click_tests/issue5237_frame.html +0 -1
- package/lib/test/data/click_tests/issue5237_target.html +0 -10
- package/lib/test/data/click_tests/link_that_wraps.html +0 -11
- package/lib/test/data/click_tests/mapped_page1.html +0 -9
- package/lib/test/data/click_tests/mapped_page2.html +0 -9
- package/lib/test/data/click_tests/mapped_page3.html +0 -9
- package/lib/test/data/click_tests/overlapping_elements.html +0 -70
- package/lib/test/data/click_tests/partially_overlapping_elements.html +0 -124
- package/lib/test/data/click_tests/span_that_wraps.html +0 -11
- package/lib/test/data/click_tests/submitted_page.html +0 -9
- package/lib/test/data/click_tests/wrapped_overlapping_elements.html +0 -13
- package/lib/test/data/click_too_big.html +0 -10
- package/lib/test/data/click_too_big_in_frame.html +0 -11
- package/lib/test/data/clicks.html +0 -35
- package/lib/test/data/closeable_window.html +0 -8
- package/lib/test/data/cn-test.html +0 -156
- package/lib/test/data/colorPage.html +0 -20
- package/lib/test/data/cookies.html +0 -30
- package/lib/test/data/coordinates_tests/element_in_frame.html +0 -9
- package/lib/test/data/coordinates_tests/element_in_nested_frame.html +0 -9
- package/lib/test/data/coordinates_tests/page_with_element_out_of_view.html +0 -11
- package/lib/test/data/coordinates_tests/page_with_empty_element.html +0 -10
- package/lib/test/data/coordinates_tests/page_with_fixed_element.html +0 -12
- package/lib/test/data/coordinates_tests/page_with_hidden_element.html +0 -10
- package/lib/test/data/coordinates_tests/page_with_invisible_element.html +0 -10
- package/lib/test/data/coordinates_tests/page_with_transparent_element.html +0 -10
- package/lib/test/data/coordinates_tests/simple_page.html +0 -10
- package/lib/test/data/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- package/lib/test/data/css/ui-lightness/jquery-ui-1.8.10.custom.css +0 -573
- package/lib/test/data/cssTransform.html +0 -61
- package/lib/test/data/cssTransform2.html +0 -20
- package/lib/test/data/document_write_in_onload.html +0 -13
- package/lib/test/data/dragAndDropInsideScrolledDiv.html +0 -67
- package/lib/test/data/dragAndDropTest.html +0 -102
- package/lib/test/data/dragDropOverflow.html +0 -104
- package/lib/test/data/draggableLists.html +0 -67
- package/lib/test/data/droppableItems.html +0 -65
- package/lib/test/data/dynamic.html +0 -39
- package/lib/test/data/dynamicallyModifiedPage.html +0 -42
- package/lib/test/data/errors.html +0 -15
- package/lib/test/data/firefox/jetpack-sample.xpi +0 -0
- package/lib/test/data/firefox/sample.xpi +0 -0
- package/lib/test/data/firefox/webextension.xpi +0 -0
- package/lib/test/data/fixedFooterNoScroll.html +0 -13
- package/lib/test/data/fixedFooterNoScrollQuirksMode.html +0 -12
- package/lib/test/data/formPage.html +0 -175
- package/lib/test/data/formSelectionPage.html +0 -46
- package/lib/test/data/form_handling_js_submit.html +0 -30
- package/lib/test/data/framePage3.html +0 -7
- package/lib/test/data/frameScrollChild.html +0 -26
- package/lib/test/data/frameScrollPage.html +0 -14
- package/lib/test/data/frameScrollParent.html +0 -11
- package/lib/test/data/frameWithAnimals.html +0 -11
- package/lib/test/data/frame_switching_tests/bug4876.html +0 -9
- package/lib/test/data/frame_switching_tests/bug4876_iframe.html +0 -9
- package/lib/test/data/frame_switching_tests/deletingFrame.html +0 -29
- package/lib/test/data/frame_switching_tests/deletingFrame_iframe.html +0 -8
- package/lib/test/data/frame_switching_tests/deletingFrame_iframe2.html +0 -7
- package/lib/test/data/frameset.html +0 -14
- package/lib/test/data/framesetPage2.html +0 -7
- package/lib/test/data/framesetPage3.html +0 -4
- package/lib/test/data/globalscope.html +0 -15
- package/lib/test/data/hidden.html +0 -5
- package/lib/test/data/hidden_partially.html +0 -45
- package/lib/test/data/html5/blue.jpg +0 -0
- package/lib/test/data/html5/database.js +0 -84
- package/lib/test/data/html5/geolocation.js +0 -18
- package/lib/test/data/html5/green.jpg +0 -0
- package/lib/test/data/html5/red.jpg +0 -0
- package/lib/test/data/html5/status.html +0 -1
- package/lib/test/data/html5/test.appcache +0 -11
- package/lib/test/data/html5/yellow.jpg +0 -0
- package/lib/test/data/html5Page.html +0 -32
- package/lib/test/data/icon.gif +0 -0
- package/lib/test/data/idElements.html +0 -2
- package/lib/test/data/iframeAtBottom.html +0 -15
- package/lib/test/data/iframeWithAlert.html +0 -1
- package/lib/test/data/iframeWithIframe.html +0 -1
- package/lib/test/data/iframes.html +0 -11
- package/lib/test/data/injectableContent.html +0 -22
- package/lib/test/data/javascriptEnhancedForm.html +0 -30
- package/lib/test/data/javascriptPage.html +0 -285
- package/lib/test/data/jquery-1.3.2.js +0 -4376
- package/lib/test/data/js/jquery-1.4.4.min.js +0 -167
- package/lib/test/data/js/jquery-ui-1.8.10.custom.min.js +0 -782
- package/lib/test/data/js/skins/lightgray/content.inline.min.css +0 -1
- package/lib/test/data/js/skins/lightgray/content.min.css +0 -1
- package/lib/test/data/js/skins/lightgray/fonts/readme.md +0 -1
- package/lib/test/data/js/skins/lightgray/fonts/tinymce-small.dev.svg +0 -175
- package/lib/test/data/js/skins/lightgray/fonts/tinymce-small.eot +0 -0
- package/lib/test/data/js/skins/lightgray/fonts/tinymce-small.svg +0 -62
- package/lib/test/data/js/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- package/lib/test/data/js/skins/lightgray/fonts/tinymce-small.woff +0 -0
- package/lib/test/data/js/skins/lightgray/fonts/tinymce.dev.svg +0 -153
- package/lib/test/data/js/skins/lightgray/fonts/tinymce.eot +0 -0
- package/lib/test/data/js/skins/lightgray/fonts/tinymce.svg +0 -63
- package/lib/test/data/js/skins/lightgray/fonts/tinymce.ttf +0 -0
- package/lib/test/data/js/skins/lightgray/fonts/tinymce.woff +0 -0
- package/lib/test/data/js/skins/lightgray/img/anchor.gif +0 -0
- package/lib/test/data/js/skins/lightgray/img/loader.gif +0 -0
- package/lib/test/data/js/skins/lightgray/img/object.gif +0 -0
- package/lib/test/data/js/skins/lightgray/img/trans.gif +0 -0
- package/lib/test/data/js/skins/lightgray/skin.ie7.min.css +0 -1
- package/lib/test/data/js/skins/lightgray/skin.min.css +0 -1
- package/lib/test/data/js/themes/modern/theme.min.js +0 -1
- package/lib/test/data/js/tinymce.min.js +0 -10
- package/lib/test/data/key_logger.html +0 -34
- package/lib/test/data/key_tests/remove_on_keypress.html +0 -36
- package/lib/test/data/keyboard_shortcut.html +0 -36
- package/lib/test/data/linked_image.html +0 -16
- package/lib/test/data/locators_tests/boolean_attribute_selected.html +0 -13
- package/lib/test/data/locators_tests/boolean_attribute_selected_html4.html +0 -13
- package/lib/test/data/longContentPage.html +0 -55
- package/lib/test/data/macbeth.html +0 -5255
- package/lib/test/data/map.png +0 -0
- package/lib/test/data/map_visibility.html +0 -8
- package/lib/test/data/markerTransparent.png +0 -0
- package/lib/test/data/messages.html +0 -15
- package/lib/test/data/meta-redirect.html +0 -11
- package/lib/test/data/missedJsReference.html +0 -11
- package/lib/test/data/modal_dialogs/modal_1.html +0 -21
- package/lib/test/data/modal_dialogs/modal_2.html +0 -21
- package/lib/test/data/modal_dialogs/modal_3.html +0 -15
- package/lib/test/data/modal_dialogs/modalindex.html +0 -21
- package/lib/test/data/mouseOver.html +0 -17
- package/lib/test/data/mousePositionTracker.html +0 -33
- package/lib/test/data/nestedElements.html +0 -164
- package/lib/test/data/overflow/x_auto_y_auto.html +0 -30
- package/lib/test/data/overflow/x_auto_y_hidden.html +0 -30
- package/lib/test/data/overflow/x_auto_y_scroll.html +0 -30
- package/lib/test/data/overflow/x_hidden_y_auto.html +0 -30
- package/lib/test/data/overflow/x_hidden_y_hidden.html +0 -30
- package/lib/test/data/overflow/x_hidden_y_scroll.html +0 -30
- package/lib/test/data/overflow/x_scroll_y_auto.html +0 -30
- package/lib/test/data/overflow/x_scroll_y_hidden.html +0 -30
- package/lib/test/data/overflow/x_scroll_y_scroll.html +0 -30
- package/lib/test/data/overflow-body.html +0 -15
- package/lib/test/data/pageWithOnBeforeUnloadMessage.html +0 -20
- package/lib/test/data/pageWithOnLoad.html +0 -6
- package/lib/test/data/pageWithOnUnload.html +0 -6
- package/lib/test/data/page_with_link_to_slow_loading_page.html +0 -6
- package/lib/test/data/plain.txt +0 -1
- package/lib/test/data/proxy/page1.html +0 -20
- package/lib/test/data/proxy/page2.html +0 -24
- package/lib/test/data/proxy/page3.html +0 -5
- package/lib/test/data/readOnlyPage.html +0 -24
- package/lib/test/data/rectangles.html +0 -40
- package/lib/test/data/resultPage.html +0 -25
- package/lib/test/data/rich_text.html +0 -161
- package/lib/test/data/safari/frames_benchmark.html +0 -31
- package/lib/test/data/screen/screen.css +0 -19
- package/lib/test/data/screen/screen.html +0 -72
- package/lib/test/data/screen/screen.js +0 -7
- package/lib/test/data/screen/screen_frame1.html +0 -72
- package/lib/test/data/screen/screen_frame2.html +0 -72
- package/lib/test/data/screen/screen_frames.html +0 -11
- package/lib/test/data/screen/screen_iframes.html +0 -12
- package/lib/test/data/screen/screen_too_long.html +0 -68
- package/lib/test/data/screen/screen_x_long.html +0 -72
- package/lib/test/data/screen/screen_x_too_long.html +0 -72
- package/lib/test/data/screen/screen_y_long.html +0 -72
- package/lib/test/data/screen/screen_y_too_long.html +0 -72
- package/lib/test/data/scroll.html +0 -27
- package/lib/test/data/scroll2.html +0 -21
- package/lib/test/data/scroll3.html +0 -8
- package/lib/test/data/scroll4.html +0 -7
- package/lib/test/data/scroll5.html +0 -18
- package/lib/test/data/scrolling_tests/frame_with_height_above_200.html +0 -26
- package/lib/test/data/scrolling_tests/frame_with_height_above_2000.html +0 -26
- package/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame.html +0 -11
- package/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame_out_of_view.html +0 -12
- package/lib/test/data/scrolling_tests/frame_with_small_height.html +0 -10
- package/lib/test/data/scrolling_tests/page_with_double_overflow_auto.html +0 -19
- package/lib/test/data/scrolling_tests/page_with_frame_out_of_view.html +0 -12
- package/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames.html +0 -11
- package/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames_out_of_view.html +0 -12
- package/lib/test/data/scrolling_tests/page_with_non_scrolling_frame.html +0 -11
- package/lib/test/data/scrolling_tests/page_with_scrolling_frame.html +0 -11
- package/lib/test/data/scrolling_tests/page_with_scrolling_frame_out_of_view.html +0 -12
- package/lib/test/data/scrolling_tests/page_with_tall_frame.html +0 -11
- package/lib/test/data/scrolling_tests/page_with_y_overflow_auto.html +0 -14
- package/lib/test/data/scrolling_tests/target_page.html +0 -9
- package/lib/test/data/selectPage.html +0 -58
- package/lib/test/data/selectableItems.html +0 -65
- package/lib/test/data/sessionCookie.html +0 -21
- package/lib/test/data/sessionCookieDest.html +0 -34
- package/lib/test/data/simple.xml +0 -5
- package/lib/test/data/simpleTest.html +0 -98
- package/lib/test/data/single_text_input.html +0 -12
- package/lib/test/data/slowLoadingAlert.html +0 -10
- package/lib/test/data/slowLoadingResourcePage.html +0 -12
- package/lib/test/data/slow_loading_iframes.html +0 -14
- package/lib/test/data/styledPage.html +0 -28
- package/lib/test/data/svgPiechart.xhtml +0 -81
- package/lib/test/data/svgTest.svg +0 -4
- package/lib/test/data/tables.html +0 -36
- package/lib/test/data/tinymce.html +0 -10
- package/lib/test/data/transformable.xml +0 -11
- package/lib/test/data/transformable.xsl +0 -37
- package/lib/test/data/transparentUpload.html +0 -70
- package/lib/test/data/underscore.html +0 -9
- package/lib/test/data/unicode_ltr.html +0 -8
- package/lib/test/data/upload.html +0 -45
- package/lib/test/data/userDefinedProperty.html +0 -8
- package/lib/test/data/veryLargeCanvas.html +0 -81
- package/lib/test/data/visibility-css.html +0 -21
- package/lib/test/data/win32frameset.html +0 -8
- package/lib/test/data/window_switching_tests/page_with_frame.html +0 -12
- package/lib/test/data/window_switching_tests/simple_page.html +0 -9
- package/lib/test/data/xhtmlFormPage.xhtml +0 -17
- package/lib/test/data/xhtmlTest.html +0 -76
- package/lib/test/fileserver.js +0 -321
- package/lib/test/httpserver.js +0 -120
- package/lib/test/index.js +0 -270
- package/lib/test/promise.js +0 -79
- package/lib/test/resources.js +0 -44
- package/opera.js +0 -405
- package/phantomjs.js +0 -282
- package/test/actions_test.js +0 -52
- package/test/chrome/options_test.js +0 -227
- package/test/chrome/service_test.js +0 -45
- package/test/cookie_test.js +0 -214
- package/test/element_finding_test.js +0 -426
- package/test/execute_script_test.js +0 -350
- package/test/fingerprint_test.js +0 -62
- package/test/firefox/extension_test.js +0 -120
- package/test/firefox/firefox_test.js +0 -261
- package/test/firefox/profile_test.js +0 -140
- package/test/http/http_test.js +0 -223
- package/test/http/util_test.js +0 -178
- package/test/io/io_test.js +0 -360
- package/test/io/zip_test.js +0 -128
- package/test/lib/by_test.js +0 -160
- package/test/lib/capabilities_test.js +0 -111
- package/test/lib/error_test.js +0 -305
- package/test/lib/events_test.js +0 -177
- package/test/lib/http_test.js +0 -696
- package/test/lib/logging_test.js +0 -272
- package/test/lib/promise_aplus_test.js +0 -78
- package/test/lib/promise_error_test.js +0 -884
- package/test/lib/promise_flow_test.js +0 -2288
- package/test/lib/promise_generator_test.js +0 -310
- package/test/lib/promise_test.js +0 -1109
- package/test/lib/testutil.js +0 -90
- package/test/lib/until_test.js +0 -478
- package/test/lib/webdriver_test.js +0 -2311
- package/test/logging_test.js +0 -167
- package/test/net/index_test.js +0 -60
- package/test/net/portprober_test.js +0 -128
- package/test/page_loading_test.js +0 -166
- package/test/phantomjs/execute_phantomjs_test.js +0 -59
- package/test/proxy_test.js +0 -180
- package/test/rect_test.js +0 -60
- package/test/remote_test.js +0 -117
- package/test/safari_test.js +0 -108
- package/test/session_test.js +0 -99
- package/test/stale_element_test.js +0 -63
- package/test/tag_name_test.js +0 -36
- package/test/testing/assert_test.js +0 -373
- package/test/testing/index_test.js +0 -224
- package/test/upload_test.js +0 -86
- package/test/window_test.js +0 -161
- package/testing/assert.js +0 -378
package/CHANGES.md
CHANGED
|
@@ -1,3 +1,249 @@
|
|
|
1
|
+
## v4.0.0-alpha.4
|
|
2
|
+
|
|
3
|
+
### Changes
|
|
4
|
+
|
|
5
|
+
* Removed BUILD.bazel files from the build artifact
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## v4.0.0-alpha.3
|
|
9
|
+
|
|
10
|
+
### Notice
|
|
11
|
+
|
|
12
|
+
* The minimum supported version of Node is now 10.15.0 LTS
|
|
13
|
+
|
|
14
|
+
### Changes
|
|
15
|
+
|
|
16
|
+
* add `pollTimeout` argument to the `wait()` method. Default value is `200`ms
|
|
17
|
+
* add `switchTo().parentFrame()` for non-W3C compatible drivers
|
|
18
|
+
* add support for opening a new window
|
|
19
|
+
|
|
20
|
+
### API Changes
|
|
21
|
+
|
|
22
|
+
* Export `lib/input.Origin` from the top level `selenium-webdriver` module.
|
|
23
|
+
* HTTP requests from this library will now include a User-Agent of the form
|
|
24
|
+
`selenium/${VERSION} (js ${PLATFORM})`.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## v4.0.0-alpha.1
|
|
28
|
+
|
|
29
|
+
### Notice
|
|
30
|
+
|
|
31
|
+
* The minimum supported version of Node is now 8.9.0 LTS
|
|
32
|
+
|
|
33
|
+
### Changes to Supported Browsers
|
|
34
|
+
|
|
35
|
+
Native support has been removed for Opera and PhantomJS as the WebDriver
|
|
36
|
+
implementations for these browsers are no longer under active development.
|
|
37
|
+
|
|
38
|
+
For Opera, users should be able to simply rely on testing Chrome as the Opera
|
|
39
|
+
browser is based on Chromium (and the operadriver was a thin wrapper around
|
|
40
|
+
chromedriver). For PhantomJS, users should use Chrome or Firefox in headless
|
|
41
|
+
mode (see `example/headless.js`)
|
|
42
|
+
|
|
43
|
+
### Changes for W3C WebDriver Spec Compliance
|
|
44
|
+
|
|
45
|
+
* Revamped the actions API to conform with the WebDriver Spec:
|
|
46
|
+
<https://www.w3.org/TR/webdriver/#actions>. For details, refer to the JS doc
|
|
47
|
+
on the `lib/input.Actions` class.
|
|
48
|
+
|
|
49
|
+
As of January, 2018, only Firefox natively supports this new API. You can
|
|
50
|
+
put the `Actions` class into "bridge mode" and it will attempt to translate
|
|
51
|
+
mouse and keyboard actions to the legacy API (see class docs). Alternatively,
|
|
52
|
+
you may continue to use the legacy API directly via the `lib/actions` module.
|
|
53
|
+
__NOTE:__ The legacy API is considered strongly deprecated and will be
|
|
54
|
+
removed in a minor release once Google's Chrome and Microsoft's Edge browsers
|
|
55
|
+
support the new API.
|
|
56
|
+
|
|
57
|
+
* All window manipulation commands are now supported.
|
|
58
|
+
* Added `driver.switchTo().parentFrame()`
|
|
59
|
+
* When a named cookie is requested, attempt to fetch it directly using the
|
|
60
|
+
W3C endpoint, `GET /session/{session id}/cookie/{name}`. If this command is
|
|
61
|
+
not recognized by the remote end, fallback to fetching all cookies and then
|
|
62
|
+
searching for the desired name.
|
|
63
|
+
* Replaced `WebElement.getSize()` and `WebElement.getLocation()` with a single
|
|
64
|
+
method, `WebElement.getRect()`.
|
|
65
|
+
|
|
66
|
+
### API Changes
|
|
67
|
+
|
|
68
|
+
* The core WebDriver API no longer uses promise manager
|
|
69
|
+
- Removed `index.Builder#setControlFlow()`
|
|
70
|
+
- The following thenable types no longer have a `cancel()` method:
|
|
71
|
+
- The dynamically generated thenable WebDrivers created by `index.Builder`
|
|
72
|
+
- `lib/webdriver.AlertPromise`
|
|
73
|
+
- `lib/webdriver.WebElementPromise`
|
|
74
|
+
* Removed `remote/index.DriverService.prototype.stop()` (use `#kill()` instead)
|
|
75
|
+
* Removed the `lib/actions` module
|
|
76
|
+
* Removed the `lib/events` module
|
|
77
|
+
* Removed the `phantomjs` module
|
|
78
|
+
* Removed the 'opera' module
|
|
79
|
+
* Removed the promise manager from `lib/promise`, which includes the removal
|
|
80
|
+
of the following exported names (replacements, if any, in parentheses):
|
|
81
|
+
- CancellableThenable
|
|
82
|
+
- CancellationError
|
|
83
|
+
- ControlFlow
|
|
84
|
+
- Deferred
|
|
85
|
+
- LONG_STACK_TRACES
|
|
86
|
+
- MultipleUnhandledRejectionError
|
|
87
|
+
- Promise (use native Promises)
|
|
88
|
+
- Resolver
|
|
89
|
+
- Scheduler
|
|
90
|
+
- Thenable
|
|
91
|
+
- USE_PROMISE_MANAGER
|
|
92
|
+
- all (use Promise.all)
|
|
93
|
+
- asap (use Promise.resolve)
|
|
94
|
+
- captureStackTrace (use Error.captureStackTrace)
|
|
95
|
+
- consume (use async functions)
|
|
96
|
+
- controlFlow
|
|
97
|
+
- createPromise (use new Promise)
|
|
98
|
+
- defer
|
|
99
|
+
- fulfilled (use Promise.resolve)
|
|
100
|
+
- isGenerator
|
|
101
|
+
- rejected (use Promise.reject)
|
|
102
|
+
- setDefaultFlow
|
|
103
|
+
- when (use Promise.resolve)
|
|
104
|
+
* Changes to the `Builder` class:
|
|
105
|
+
- Added setChromeService, setEdgeService, & setFirefoxService
|
|
106
|
+
- Removed setEnableNativeEvents
|
|
107
|
+
- Removed setScrollBehavior
|
|
108
|
+
* Changes to `chrome.Driver`
|
|
109
|
+
- Added sendDevToolsCommand
|
|
110
|
+
- Added setDownloadPath
|
|
111
|
+
* Changes to `chrome.Options`
|
|
112
|
+
- Now extends the `Capabilities` class
|
|
113
|
+
- Removed from/toCapabilities
|
|
114
|
+
* Changes to `edge.Options`
|
|
115
|
+
- Now extends the `Capabilities` class
|
|
116
|
+
- Removed from/toCapabilities
|
|
117
|
+
* Changes to `ie.Options`
|
|
118
|
+
- Now extends the `Capabilities` class
|
|
119
|
+
- Removed from/toCapabilities
|
|
120
|
+
* Removed the `firefox.Binary` class. Custom binaries can still be selected
|
|
121
|
+
using `firefox.Options#setBinary()`. Likewise, custom binary arguments can be
|
|
122
|
+
specified with `firefox.Options#addArguments()`.
|
|
123
|
+
* Changes to `firefox.Driver`
|
|
124
|
+
- Added installAddon(path)
|
|
125
|
+
- Added uninstallAddon(id)
|
|
126
|
+
* Changes to `firefox.Options`
|
|
127
|
+
- Now extends the `Capabilities` class
|
|
128
|
+
- Removed from/toCapabilities
|
|
129
|
+
- Removed setLoggingPreferences (was a no-op)
|
|
130
|
+
- setProfile now only accepts a path to an existing profile
|
|
131
|
+
- Added addExtensions
|
|
132
|
+
- Added setPreference
|
|
133
|
+
* Removed the `firefox.Profile` class. All of its functionality is now
|
|
134
|
+
provided directly by `firefox.Options`
|
|
135
|
+
* Removed the `firefox/binary` module
|
|
136
|
+
* Removed the `firefox/profile` module
|
|
137
|
+
* Changes to `safari.Options`
|
|
138
|
+
- Now extends the `Capabilities` class
|
|
139
|
+
- Removed from/toCapabilities
|
|
140
|
+
- Removed setCleanSession (was a no-op)
|
|
141
|
+
* Changes to `lib/capabilities.Browser`:
|
|
142
|
+
- Removed several enum values.
|
|
143
|
+
- ANDROID (use Chrome for Android; see docs on the chrome module)
|
|
144
|
+
- IPAD (no support available)
|
|
145
|
+
- IPHONE (no support available)
|
|
146
|
+
- OPERA (use Chrome)
|
|
147
|
+
- PHANTOM_JS (use Chrome or Firefox in headless mode)
|
|
148
|
+
- HTMLUNIT (use Chrome or Firefox in headless mode)
|
|
149
|
+
* Changes to `lib/capabilities.Capabilities`:
|
|
150
|
+
- Removed static factory methods android(), ipad(), iphone(), opera(),
|
|
151
|
+
phantomjs(), htmlunit(), and htmlunitwithjs(). Users can still manually
|
|
152
|
+
configure capabilities for these, but their use is not recommended and
|
|
153
|
+
they will no longer be surfaced in the API.
|
|
154
|
+
* Changes to `lib/error`:
|
|
155
|
+
- Added
|
|
156
|
+
- ElementClickInterceptedError
|
|
157
|
+
- InsecureCertificateError
|
|
158
|
+
- InvalidCoordinatesError
|
|
159
|
+
- NoSuchCookieError
|
|
160
|
+
- Removed
|
|
161
|
+
- ElementNotVisibleError
|
|
162
|
+
- InvalidElementCoordinatesError
|
|
163
|
+
* Changes to `lib/webdriver.WebDriver`:
|
|
164
|
+
- Dropped support for "requiredCapabilities" from WebDriver.createSession
|
|
165
|
+
- actions() now returns the new `lib/input.Actions` class
|
|
166
|
+
- Removed touchActions
|
|
167
|
+
- Renamed schedule to execute
|
|
168
|
+
- Removed the `WebDriver.attachToSession()` factory method. Users can just
|
|
169
|
+
the `WebDriver` constructor directly instead.
|
|
170
|
+
- Removed the `call()` method. This was used to inject custom function calls
|
|
171
|
+
into the control flow. Now that the promise manager is no longer used,
|
|
172
|
+
this method is no longer necessary. Users are now responsible for
|
|
173
|
+
coordinating actions (ideally with async functions) and can just call
|
|
174
|
+
functions directly instead of through `driver.call()`.
|
|
175
|
+
* Changes to `lib/webdriver.WebElement`:
|
|
176
|
+
- Replaced getSize & getLocation with getRect
|
|
177
|
+
* Changes to `lib/webdriver.Alert`:
|
|
178
|
+
- Removed authenticateAs
|
|
179
|
+
* Changes to `lib/webdriver.Options` (`driver.manage()`):
|
|
180
|
+
- Removed timeouts (use get/setTimeouts)
|
|
181
|
+
* Changes to `lib/webdriver.Window` (`driver.manage().window()`):
|
|
182
|
+
- Added
|
|
183
|
+
- getRect
|
|
184
|
+
- setRect
|
|
185
|
+
- fullscreen
|
|
186
|
+
- minimize
|
|
187
|
+
- Removed (use the getRect/setRect methods)
|
|
188
|
+
- getPosition
|
|
189
|
+
- setPosition
|
|
190
|
+
- getSize
|
|
191
|
+
- setSize
|
|
192
|
+
* Removed the `testing/assert` module
|
|
193
|
+
* Changes to `testing/index`
|
|
194
|
+
- Since the promise manager has been removed, it is no longer necessary to
|
|
195
|
+
wrap the Mocha test hooks; instead, users can simply use async functions.
|
|
196
|
+
The following have all been removed:
|
|
197
|
+
- describe
|
|
198
|
+
- before
|
|
199
|
+
- beforeEach
|
|
200
|
+
- after
|
|
201
|
+
- afterEach
|
|
202
|
+
- it
|
|
203
|
+
- Added the `suite` function. For details, refer to the jsdoc or
|
|
204
|
+
`example/google_search_test.js`
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
## v3.6.0
|
|
209
|
+
|
|
210
|
+
### Bug Fixes
|
|
211
|
+
|
|
212
|
+
* The Capabilities factory methods should only specify the name of the browser.
|
|
213
|
+
* Protect against the remote end sometimes not returning a list to findElements
|
|
214
|
+
commands.
|
|
215
|
+
* Properly reset state in `remote.DriverService#kill()`
|
|
216
|
+
* The firefox module will no longer apply the preferences required by the legacy
|
|
217
|
+
FirefoxDriver. These preferences were only required when using the legacy
|
|
218
|
+
driver, support for which was dropped in v3.5.0.
|
|
219
|
+
|
|
220
|
+
### API Changes
|
|
221
|
+
|
|
222
|
+
* Added new methods to `selenium-webdriver/firefox.Options`:
|
|
223
|
+
- addArguments()
|
|
224
|
+
- headless()
|
|
225
|
+
- windowSize()
|
|
226
|
+
* Deprecated `selenium-webdriver/firefox/binary.Binary`
|
|
227
|
+
* Removed `selenium-webdriver/firefox.Options#useGeckoDriver()`
|
|
228
|
+
* Removed the unused `selenium-webdriver/firefox/profile.decode()`
|
|
229
|
+
* Removed methods from `selenium-webdriver/firefox/profile.Profile` that had
|
|
230
|
+
no effect since support for the legacy FirefoxDriver was dropped in 3.5.0:
|
|
231
|
+
- setNativeEventsEnabled
|
|
232
|
+
- nativeEventsEnabled
|
|
233
|
+
- getPort
|
|
234
|
+
- setPort
|
|
235
|
+
* Removed `selenium-webdriver/firefox.ServiceBuilder#setFirefoxBinary()`; custom
|
|
236
|
+
binaries should be configured through the `firefox.Options` class.
|
|
237
|
+
* Removed `selenium-webdriver/firefox.Capability`. These hold overs from the
|
|
238
|
+
legacy FirefoxDriver are no longer supported.
|
|
239
|
+
|
|
240
|
+
### Changes for W3C WebDriver Spec Compliance
|
|
241
|
+
|
|
242
|
+
* Deprecated `error.ElementNotVisibleError` in favor of the more generic
|
|
243
|
+
`error.ElementNotInteractableError`.
|
|
244
|
+
* Support the `httpOnly` option when adding a cookie.
|
|
245
|
+
|
|
246
|
+
|
|
1
247
|
## v3.5.0
|
|
2
248
|
|
|
3
249
|
### Notice
|
package/LICENSE
CHANGED
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
same "printed page" as the copyright notice for easier
|
|
188
188
|
identification within third-party archives.
|
|
189
189
|
|
|
190
|
-
Copyright
|
|
190
|
+
Copyright 2019 Software Freedom Conservancy (SFC)
|
|
191
191
|
|
|
192
192
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
193
|
you may not use this file except in compliance with the License.
|
package/NOTICE
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Copyright 2011-
|
|
1
|
+
Copyright 2011-2019 Software Freedom Conservancy
|
|
2
2
|
Copyright 2004-2011 Selenium committers
|
package/README.md
CHANGED
|
@@ -11,11 +11,11 @@ Selenium may be installed via npm with
|
|
|
11
11
|
npm install selenium-webdriver
|
|
12
12
|
|
|
13
13
|
You will need to download additional components to work with each of the major
|
|
14
|
-
browsers. The drivers for Chrome, Firefox,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
browsers. The drivers for Chrome, Firefox, and Microsoft's IE and Edge web
|
|
15
|
+
browsers are all standalone executables that should be placed on your system
|
|
16
|
+
[PATH]. Apple's safaridriver is shipped with Safari 10 for OS X El Capitan and
|
|
17
|
+
macOS Sierra. You will need to enable Remote Automation in the Develop menu of
|
|
18
|
+
Safari 10 before testing.
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
| Browser | Component |
|
|
@@ -24,8 +24,6 @@ Automation in the Develop menu of Safari 10 before testing.
|
|
|
24
24
|
| Internet Explorer | [IEDriverServer.exe][release] |
|
|
25
25
|
| Edge | [MicrosoftWebDriver.msi][edge] |
|
|
26
26
|
| Firefox | [geckodriver(.exe)][geckodriver] |
|
|
27
|
-
| PhantomJS | [phantomjs(.exe)][phantomjs] |
|
|
28
|
-
| Opera | [operadriver(.exe)][opera] |
|
|
29
27
|
| Safari | [safaridriver] |
|
|
30
28
|
|
|
31
29
|
## Usage
|
|
@@ -33,19 +31,20 @@ Automation in the Develop menu of Safari 10 before testing.
|
|
|
33
31
|
The sample below and others are included in the `example` directory. You may
|
|
34
32
|
also find the tests for selenium-webdriver informative.
|
|
35
33
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
driver.
|
|
45
|
-
|
|
46
|
-
driver.
|
|
47
|
-
|
|
48
|
-
|
|
34
|
+
```javascript
|
|
35
|
+
const {Builder, By, Key, until} = require('selenium-webdriver');
|
|
36
|
+
|
|
37
|
+
(async function example() {
|
|
38
|
+
let driver = await new Builder().forBrowser('firefox').build();
|
|
39
|
+
try {
|
|
40
|
+
await driver.get('http://www.google.com/ncr');
|
|
41
|
+
await driver.findElement(By.name('q')).sendKeys('webdriver', Key.RETURN);
|
|
42
|
+
await driver.wait(until.titleIs('webdriver - Google Search'), 1000);
|
|
43
|
+
} finally {
|
|
44
|
+
await driver.quit();
|
|
45
|
+
}
|
|
46
|
+
})();
|
|
47
|
+
```
|
|
49
48
|
|
|
50
49
|
### Using the Builder API
|
|
51
50
|
|
|
@@ -54,15 +53,17 @@ instances. Rather than clutter your code with branches for the various browsers,
|
|
|
54
53
|
the builder lets you set all options in one flow. When you call
|
|
55
54
|
`Builder#build()`, all options irrelevant to the selected browser are dropped:
|
|
56
55
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
```javascript
|
|
57
|
+
const webdriver = require('selenium-webdriver');
|
|
58
|
+
const chrome = require('selenium-webdriver/chrome');
|
|
59
|
+
const firefox = require('selenium-webdriver/firefox');
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
let driver = new webdriver.Builder()
|
|
62
|
+
.forBrowser('firefox')
|
|
63
|
+
.setChromeOptions(/* ... */)
|
|
64
|
+
.setFirefoxOptions(/* ... */)
|
|
65
|
+
.build();
|
|
66
|
+
```
|
|
66
67
|
|
|
67
68
|
Why would you want to configure options irrelevant to the target browser? The
|
|
68
69
|
`Builder`'s API defines your _default_ configuration. You can change the target
|
|
@@ -95,11 +96,12 @@ server with
|
|
|
95
96
|
You may configure your tests to run against a remote server through the Builder
|
|
96
97
|
API:
|
|
97
98
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
```javascript
|
|
100
|
+
let driver = new webdriver.Builder()
|
|
101
|
+
.forBrowser('firefox')
|
|
102
|
+
.usingServer('http://localhost:4444/wd/hub')
|
|
103
|
+
.build();
|
|
104
|
+
```
|
|
103
105
|
Or change the Builder's configuration at runtime with the `SELENIUM_REMOTE_URL`
|
|
104
106
|
environment variable:
|
|
105
107
|
|
|
@@ -165,11 +167,11 @@ months, the support window for selenium-webdriver will be roughly:
|
|
|
165
167
|
|
|
166
168
|
| Date | LTS | Stable |
|
|
167
169
|
| --------- | ---: | -----: |
|
|
168
|
-
| (current) |
|
|
169
|
-
|
|
|
170
|
-
|
|
|
171
|
-
|
|
|
172
|
-
|
|
|
170
|
+
| (current) | 8.9 | 9.0 |
|
|
171
|
+
| 2018-04 | 8.x | 10.0 |
|
|
172
|
+
| 2018-10 | 10.x | 11.0 |
|
|
173
|
+
| 2019-04 | 10.x | 12.0 |
|
|
174
|
+
| 2019-10 | 12.x | 13.0 |
|
|
173
175
|
|
|
174
176
|
## Issues
|
|
175
177
|
|
|
@@ -219,8 +221,6 @@ under the License.
|
|
|
219
221
|
[chrome]: http://chromedriver.storage.googleapis.com/index.html
|
|
220
222
|
[gh]: https://github.com/SeleniumHQ/selenium/
|
|
221
223
|
[issues]: https://github.com/SeleniumHQ/selenium/issues
|
|
222
|
-
[opera]: https://github.com/operasoftware/operachromiumdriver/releases
|
|
223
|
-
[phantomjs]: http://phantomjs.org/
|
|
224
224
|
[edge]: http://go.microsoft.com/fwlink/?LinkId=619687
|
|
225
225
|
[geckodriver]: https://github.com/mozilla/geckodriver/releases/
|
|
226
226
|
[reduction]: http://www.webkit.org/quality/reduction.html
|