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/.npmignore
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
-
// or more contributor license agreements. See the NOTICE file
|
|
3
|
-
// distributed with this work for additional information
|
|
4
|
-
// regarding copyright ownership. The SFC licenses this file
|
|
5
|
-
// to you under the Apache License, Version 2.0 (the
|
|
6
|
-
// "License"); you may not use this file except in compliance
|
|
7
|
-
// with the License. You may obtain a copy of the License at
|
|
8
|
-
//
|
|
9
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
//
|
|
11
|
-
// Unless required by applicable law or agreed to in writing,
|
|
12
|
-
// software distributed under the License is distributed on an
|
|
13
|
-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
// KIND, either express or implied. See the License for the
|
|
15
|
-
// specific language governing permissions and limitations
|
|
16
|
-
// under the License.
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @fileoverview Example Mocha tests using async/await.
|
|
20
|
-
*
|
|
21
|
-
* Usage:
|
|
22
|
-
*
|
|
23
|
-
* mocha -t 20000 --harmony_async_await \
|
|
24
|
-
* selenium-webdriver/example/async_await_test.js
|
|
25
|
-
*
|
|
26
|
-
* You can change which browser is started with the SELENIUM_BROWSER environment
|
|
27
|
-
* variable:
|
|
28
|
-
*
|
|
29
|
-
* SELENIUM_BROWSER=chrome \
|
|
30
|
-
* mocha -t 20000 --harmony_async_await \
|
|
31
|
-
* selenium-webdriver/example/async_await_test.js
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
'use strict';
|
|
35
|
-
|
|
36
|
-
const assert = require('assert');
|
|
37
|
-
const {Builder, By, promise, until} = require('..');
|
|
38
|
-
|
|
39
|
-
// async/await do not work well when the promise manager is enabled.
|
|
40
|
-
// See https://github.com/SeleniumHQ/selenium/issues/3037
|
|
41
|
-
//
|
|
42
|
-
// 3037 does not impact these specific examples, but it is still recommended
|
|
43
|
-
// that you disable the promise manager when using async/await.
|
|
44
|
-
promise.USE_PROMISE_MANAGER = false;
|
|
45
|
-
|
|
46
|
-
describe('Google Search', function() {
|
|
47
|
-
let driver;
|
|
48
|
-
|
|
49
|
-
beforeEach(async function() {
|
|
50
|
-
driver = await new Builder().forBrowser('firefox').build();
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
afterEach(async function() {
|
|
54
|
-
await driver.quit();
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
it('example', async function() {
|
|
58
|
-
await driver.get('https://www.google.com/ncr');
|
|
59
|
-
|
|
60
|
-
await driver.findElement(By.name('q')).sendKeys('webdriver');
|
|
61
|
-
await driver.findElement(By.name('btnG')).click();
|
|
62
|
-
|
|
63
|
-
await driver.wait(until.titleIs('webdriver - Google Search'), 1000);
|
|
64
|
-
|
|
65
|
-
let url = await driver.getCurrentUrl();
|
|
66
|
-
assert.equal(url, 'https://www.google.com/#q=webdriver');
|
|
67
|
-
});
|
|
68
|
-
});
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
-
// or more contributor license agreements. See the NOTICE file
|
|
3
|
-
// distributed with this work for additional information
|
|
4
|
-
// regarding copyright ownership. The SFC licenses this file
|
|
5
|
-
// to you under the Apache License, Version 2.0 (the
|
|
6
|
-
// "License"); you may not use this file except in compliance
|
|
7
|
-
// with the License. You may obtain a copy of the License at
|
|
8
|
-
//
|
|
9
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
//
|
|
11
|
-
// Unless required by applicable law or agreed to in writing,
|
|
12
|
-
// software distributed under the License is distributed on an
|
|
13
|
-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
// KIND, either express or implied. See the License for the
|
|
15
|
-
// specific language governing permissions and limitations
|
|
16
|
-
// under the License.
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @fileoverview An example WebDriver script using generator functions.
|
|
20
|
-
*
|
|
21
|
-
* Before running this script, ensure that Mozilla's geckodriver is present on
|
|
22
|
-
* your system PATH: <https://github.com/mozilla/geckodriver/releases>
|
|
23
|
-
*
|
|
24
|
-
* Usage:
|
|
25
|
-
*
|
|
26
|
-
* node selenium-webdriver/example/google_search_generator.js
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
'use strict';
|
|
30
|
-
|
|
31
|
-
const {Builder, By, promise, until} = require('..');
|
|
32
|
-
|
|
33
|
-
promise.consume(function* () {
|
|
34
|
-
let driver;
|
|
35
|
-
try {
|
|
36
|
-
driver = yield new Builder().forBrowser('firefox').build();
|
|
37
|
-
|
|
38
|
-
yield driver.get('http://www.google.com/ncr');
|
|
39
|
-
|
|
40
|
-
let q = yield driver.findElement(By.name('q'));
|
|
41
|
-
yield q.sendKeys('webdriver');
|
|
42
|
-
|
|
43
|
-
let btnG = yield driver.findElement(By.name('btnG'));
|
|
44
|
-
yield btnG.click();
|
|
45
|
-
|
|
46
|
-
yield driver.wait(until.titleIs('webdriver - Google Search'), 1000);
|
|
47
|
-
} finally {
|
|
48
|
-
yield driver && driver.quit();
|
|
49
|
-
}
|
|
50
|
-
}).then(_ => console.log('SUCCESS'), err => console.error('ERROR: ' + err));
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
-
// or more contributor license agreements. See the NOTICE file
|
|
3
|
-
// distributed with this work for additional information
|
|
4
|
-
// regarding copyright ownership. The SFC licenses this file
|
|
5
|
-
// to you under the Apache License, Version 2.0 (the
|
|
6
|
-
// "License"); you may not use this file except in compliance
|
|
7
|
-
// with the License. You may obtain a copy of the License at
|
|
8
|
-
//
|
|
9
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
//
|
|
11
|
-
// Unless required by applicable law or agreed to in writing,
|
|
12
|
-
// software distributed under the License is distributed on an
|
|
13
|
-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
// KIND, either express or implied. See the License for the
|
|
15
|
-
// specific language governing permissions and limitations
|
|
16
|
-
// under the License.
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @fileoverview An example of starting multiple WebDriver clients that run
|
|
20
|
-
* in parallel in separate control flows.
|
|
21
|
-
*
|
|
22
|
-
* This example will only work when the promise manager is enabled
|
|
23
|
-
* (see <https://github.com/SeleniumHQ/selenium/issues/2969>).
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
var webdriver = require('..'),
|
|
27
|
-
By = webdriver.By,
|
|
28
|
-
until = webdriver.until;
|
|
29
|
-
|
|
30
|
-
for (var i = 0; i < 3; i++) {
|
|
31
|
-
(function(n) {
|
|
32
|
-
var flow = new webdriver.promise.ControlFlow()
|
|
33
|
-
.on('uncaughtException', function(e) {
|
|
34
|
-
console.log('uncaughtException in flow %d: %s', n, e);
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
var driver = new webdriver.Builder().
|
|
38
|
-
forBrowser('firefox').
|
|
39
|
-
setControlFlow(flow). // Comment out this line to see the difference.
|
|
40
|
-
build();
|
|
41
|
-
|
|
42
|
-
// Position and resize window so it's easy to see them running together.
|
|
43
|
-
driver.manage().window().setSize(600, 400);
|
|
44
|
-
driver.manage().window().setPosition(300 * i, 400 * i);
|
|
45
|
-
|
|
46
|
-
driver.get('http://www.google.com');
|
|
47
|
-
driver.findElement(By.name('q')).sendKeys('webdriver');
|
|
48
|
-
driver.findElement(By.name('btnG')).click();
|
|
49
|
-
driver.wait(until.titleIs('webdriver - Google Search'), 1000);
|
|
50
|
-
|
|
51
|
-
driver.quit();
|
|
52
|
-
})(i);
|
|
53
|
-
}
|
|
54
|
-
|
package/firefox/binary.js
DELETED
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
-
// or more contributor license agreements. See the NOTICE file
|
|
3
|
-
// distributed with this work for additional information
|
|
4
|
-
// regarding copyright ownership. The SFC licenses this file
|
|
5
|
-
// to you under the Apache License, Version 2.0 (the
|
|
6
|
-
// "License"); you may not use this file except in compliance
|
|
7
|
-
// with the License. You may obtain a copy of the License at
|
|
8
|
-
//
|
|
9
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
//
|
|
11
|
-
// Unless required by applicable law or agreed to in writing,
|
|
12
|
-
// software distributed under the License is distributed on an
|
|
13
|
-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
// KIND, either express or implied. See the License for the
|
|
15
|
-
// specific language governing permissions and limitations
|
|
16
|
-
// under the License.
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @fileoverview Manages Firefox binaries. This module is considered internal;
|
|
20
|
-
* users should use {@link ./firefox selenium-webdriver/firefox}.
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
'use strict';
|
|
24
|
-
|
|
25
|
-
const child = require('child_process'),
|
|
26
|
-
fs = require('fs'),
|
|
27
|
-
path = require('path'),
|
|
28
|
-
util = require('util');
|
|
29
|
-
|
|
30
|
-
const isDevMode = require('../lib/devmode'),
|
|
31
|
-
Symbols = require('../lib/symbols'),
|
|
32
|
-
io = require('../io'),
|
|
33
|
-
exec = require('../io/exec');
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/** @const */
|
|
38
|
-
const NO_FOCUS_LIB_X86 = isDevMode ?
|
|
39
|
-
path.join(__dirname, '../../../../cpp/prebuilt/i386/libnoblur.so') :
|
|
40
|
-
path.join(__dirname, '../lib/firefox/i386/libnoblur.so') ;
|
|
41
|
-
|
|
42
|
-
/** @const */
|
|
43
|
-
const NO_FOCUS_LIB_AMD64 = isDevMode ?
|
|
44
|
-
path.join(__dirname, '../../../../cpp/prebuilt/amd64/libnoblur64.so') :
|
|
45
|
-
path.join(__dirname, '../lib/firefox/amd64/libnoblur64.so') ;
|
|
46
|
-
|
|
47
|
-
const X_IGNORE_NO_FOCUS_LIB = 'x_ignore_nofocus.so';
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @param {string} file Path to the file to find, relative to the program files
|
|
52
|
-
* root.
|
|
53
|
-
* @return {!Promise<?string>} A promise for the located executable.
|
|
54
|
-
* The promise will resolve to {@code null} if Firefox was not found.
|
|
55
|
-
*/
|
|
56
|
-
function findInProgramFiles(file) {
|
|
57
|
-
let files = [
|
|
58
|
-
process.env['PROGRAMFILES'] || 'C:\\Program Files',
|
|
59
|
-
process.env['PROGRAMFILES(X86)'] || 'C:\\Program Files (x86)'
|
|
60
|
-
].map(prefix => path.join(prefix, file));
|
|
61
|
-
return io.exists(files[0]).then(function(exists) {
|
|
62
|
-
return exists ? files[0] : io.exists(files[1]).then(function(exists) {
|
|
63
|
-
return exists ? files[1] : null;
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Provides methods for locating the executable for a Firefox release channel
|
|
71
|
-
* on Windows and MacOS. For other systems (i.e. Linux), Firefox will always
|
|
72
|
-
* be located on the system PATH.
|
|
73
|
-
*
|
|
74
|
-
* @final
|
|
75
|
-
*/
|
|
76
|
-
class Channel {
|
|
77
|
-
/**
|
|
78
|
-
* @param {string} darwin The path to check when running on MacOS.
|
|
79
|
-
* @param {string} win32 The path to check when running on Windows.
|
|
80
|
-
*/
|
|
81
|
-
constructor(darwin, win32) {
|
|
82
|
-
/** @private @const */ this.darwin_ = darwin;
|
|
83
|
-
/** @private @const */ this.win32_ = win32;
|
|
84
|
-
/** @private {Promise<string>} */
|
|
85
|
-
this.found_ = null;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Attempts to locate the Firefox executable for this release channel. This
|
|
90
|
-
* will first check the default installation location for the channel before
|
|
91
|
-
* checking the user's PATH. The returned promise will be rejected if Firefox
|
|
92
|
-
* can not be found.
|
|
93
|
-
*
|
|
94
|
-
* @return {!Promise<string>} A promise for the location of the located
|
|
95
|
-
* Firefox executable.
|
|
96
|
-
*/
|
|
97
|
-
locate() {
|
|
98
|
-
if (this.found_) {
|
|
99
|
-
return this.found_;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
let found;
|
|
103
|
-
switch (process.platform) {
|
|
104
|
-
case 'darwin':
|
|
105
|
-
found = io.exists(this.darwin_)
|
|
106
|
-
.then(exists => exists ? this.darwin_ : io.findInPath('firefox'));
|
|
107
|
-
break;
|
|
108
|
-
|
|
109
|
-
case 'win32':
|
|
110
|
-
found = findInProgramFiles(this.win32_)
|
|
111
|
-
.then(found => found || io.findInPath('firefox.exe'));
|
|
112
|
-
break;
|
|
113
|
-
|
|
114
|
-
default:
|
|
115
|
-
found = Promise.resolve(io.findInPath('firefox'));
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
this.found_ = found.then(found => {
|
|
120
|
-
if (found) {
|
|
121
|
-
// TODO: verify version info.
|
|
122
|
-
return found;
|
|
123
|
-
}
|
|
124
|
-
throw Error('Could not locate Firefox on the current system');
|
|
125
|
-
});
|
|
126
|
-
return this.found_;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Firefox's developer channel.
|
|
133
|
-
* @const
|
|
134
|
-
* @see <https://www.mozilla.org/en-US/firefox/channel/desktop/#aurora>
|
|
135
|
-
*/
|
|
136
|
-
Channel.AURORA = new Channel(
|
|
137
|
-
'/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin',
|
|
138
|
-
'Firefox Developer Edition\\firefox.exe');
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Firefox's beta channel. Note this is provided mainly for convenience as
|
|
142
|
-
* the beta channel has the same installation location as the main release
|
|
143
|
-
* channel.
|
|
144
|
-
* @const
|
|
145
|
-
* @see <https://www.mozilla.org/en-US/firefox/channel/desktop/#beta>
|
|
146
|
-
*/
|
|
147
|
-
Channel.BETA = new Channel(
|
|
148
|
-
'/Applications/Firefox.app/Contents/MacOS/firefox-bin',
|
|
149
|
-
'Mozilla Firefox\\firefox.exe');
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Firefox's release channel.
|
|
153
|
-
* @const
|
|
154
|
-
* @see <https://www.mozilla.org/en-US/firefox/desktop/>
|
|
155
|
-
*/
|
|
156
|
-
Channel.RELEASE = new Channel(
|
|
157
|
-
'/Applications/Firefox.app/Contents/MacOS/firefox-bin',
|
|
158
|
-
'Mozilla Firefox\\firefox.exe');
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Firefox's nightly release channel.
|
|
162
|
-
* @const
|
|
163
|
-
* @see <https://www.mozilla.org/en-US/firefox/channel/desktop/#nightly>
|
|
164
|
-
*/
|
|
165
|
-
Channel.NIGHTLY = new Channel(
|
|
166
|
-
'/Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin',
|
|
167
|
-
'Nightly\\firefox.exe');
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Copies the no focus libs into the given profile directory.
|
|
172
|
-
* @param {string} profileDir Path to the profile directory to install into.
|
|
173
|
-
* @return {!Promise<string>} The LD_LIBRARY_PATH prefix string to use
|
|
174
|
-
* for the installed libs.
|
|
175
|
-
*/
|
|
176
|
-
function installNoFocusLibs(profileDir) {
|
|
177
|
-
var x86 = path.join(profileDir, 'x86');
|
|
178
|
-
var amd64 = path.join(profileDir, 'amd64');
|
|
179
|
-
|
|
180
|
-
return io.mkdir(x86)
|
|
181
|
-
.then(() => copyLib(NO_FOCUS_LIB_X86, x86))
|
|
182
|
-
.then(() => io.mkdir(amd64))
|
|
183
|
-
.then(() => copyLib(NO_FOCUS_LIB_AMD64, amd64))
|
|
184
|
-
.then(function() {
|
|
185
|
-
return x86 + ':' + amd64;
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
function copyLib(src, dir) {
|
|
189
|
-
return io.copy(src, path.join(dir, X_IGNORE_NO_FOCUS_LIB));
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Provides a mechanism to configure and launch Firefox in a subprocess for
|
|
196
|
-
* use with WebDriver.
|
|
197
|
-
*
|
|
198
|
-
* If created _without_ a path for the Firefox binary to use, this class will
|
|
199
|
-
* attempt to find Firefox when {@link #launch()} is called. For MacOS and
|
|
200
|
-
* Windows, this class will look for Firefox in the current platform's default
|
|
201
|
-
* installation location (e.g. /Applications/Firefox.app on MacOS). For all
|
|
202
|
-
* other platforms, the Firefox executable must be available on your system
|
|
203
|
-
* `PATH`.
|
|
204
|
-
*
|
|
205
|
-
* @final
|
|
206
|
-
*/
|
|
207
|
-
class Binary {
|
|
208
|
-
/**
|
|
209
|
-
* @param {?(string|Channel)=} opt_exeOrChannel Either the path to a specific
|
|
210
|
-
* Firefox binary to use, or a {@link Channel} instance that describes
|
|
211
|
-
* how to locate the desired Firefox version.
|
|
212
|
-
*/
|
|
213
|
-
constructor(opt_exeOrChannel) {
|
|
214
|
-
/** @private {?(string|Channel)} */
|
|
215
|
-
this.exe_ = opt_exeOrChannel || null;
|
|
216
|
-
|
|
217
|
-
/** @private {!Array.<string>} */
|
|
218
|
-
this.args_ = [];
|
|
219
|
-
|
|
220
|
-
/** @private {!Object<string, string>} */
|
|
221
|
-
this.env_ = {};
|
|
222
|
-
Object.assign(this.env_, process.env, {
|
|
223
|
-
MOZ_CRASHREPORTER_DISABLE: '1',
|
|
224
|
-
MOZ_NO_REMOTE: '1',
|
|
225
|
-
NO_EM_RESTART: '1'
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
/** @private {boolean} */
|
|
229
|
-
this.devEdition_ = false;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* @return {(string|undefined)} The path to the Firefox executable to use, or
|
|
234
|
-
* `undefined` if WebDriver should attempt to locate Firefox automatically
|
|
235
|
-
* on the current system.
|
|
236
|
-
*/
|
|
237
|
-
getExe() {
|
|
238
|
-
return typeof this.exe_ === 'string' ? this.exe_ : undefined;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* Add arguments to the command line used to start Firefox.
|
|
243
|
-
* @param {...(string|!Array.<string>)} var_args Either the arguments to add
|
|
244
|
-
* as varargs, or the arguments as an array.
|
|
245
|
-
*/
|
|
246
|
-
addArguments(var_args) {
|
|
247
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
248
|
-
if (Array.isArray(arguments[i])) {
|
|
249
|
-
this.args_ = this.args_.concat(arguments[i]);
|
|
250
|
-
} else {
|
|
251
|
-
this.args_.push(arguments[i]);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* @return {!Array<string>} The command line arguments to use when starting
|
|
258
|
-
* the browser.
|
|
259
|
-
*/
|
|
260
|
-
getArguments() {
|
|
261
|
-
return this.args_;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* Specifies whether to use Firefox Developer Edition instead of the normal
|
|
266
|
-
* stable channel. Setting this option has no effect if this instance was
|
|
267
|
-
* created with a path to a specific Firefox binary.
|
|
268
|
-
*
|
|
269
|
-
* This method has no effect on Unix systems where the Firefox application
|
|
270
|
-
* has the same (default) name regardless of version.
|
|
271
|
-
*
|
|
272
|
-
* @param {boolean=} opt_use Whether to use the developer edition. Defaults to
|
|
273
|
-
* true.
|
|
274
|
-
* @deprecated Use the {@link Channel} class to indicate the desired Firefox
|
|
275
|
-
* version when creating a new binary: `new Binary(Channel.AURORA)`.
|
|
276
|
-
*/
|
|
277
|
-
useDevEdition(opt_use) {
|
|
278
|
-
this.devEdition_ = opt_use === undefined || !!opt_use;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Returns a promise for the Firefox executable used by this instance. The
|
|
283
|
-
* returned promise will be immediately resolved if the user supplied an
|
|
284
|
-
* executable path when this instance was created. Otherwise, an attempt will
|
|
285
|
-
* be made to find Firefox on the current system.
|
|
286
|
-
*
|
|
287
|
-
* @return {!Promise<string>} a promise for the path to the Firefox executable
|
|
288
|
-
* used by this instance.
|
|
289
|
-
*/
|
|
290
|
-
locate() {
|
|
291
|
-
if (typeof this.exe_ === 'string') {
|
|
292
|
-
return Promise.resolve(this.exe_);
|
|
293
|
-
} else if (this.exe_ instanceof Channel) {
|
|
294
|
-
return this.exe_.locate();
|
|
295
|
-
}
|
|
296
|
-
let channel = this.devEdition_ ? Channel.AURORA : Channel.RELEASE;
|
|
297
|
-
return channel.locate();
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* Launches Firefox and returns a promise that will be fulfilled when the
|
|
302
|
-
* process terminates.
|
|
303
|
-
* @param {string} profile Path to the profile directory to use.
|
|
304
|
-
* @return {!Promise<!exec.Command>} A promise for the handle to the started
|
|
305
|
-
* subprocess.
|
|
306
|
-
*/
|
|
307
|
-
launch(profile) {
|
|
308
|
-
let env = {};
|
|
309
|
-
Object.assign(env, this.env_, {XRE_PROFILE_PATH: profile});
|
|
310
|
-
|
|
311
|
-
let args = ['-foreground'].concat(this.args_);
|
|
312
|
-
|
|
313
|
-
return this.locate().then(function(firefox) {
|
|
314
|
-
if (process.platform === 'win32' || process.platform === 'darwin') {
|
|
315
|
-
return exec(firefox, {args: args, env: env});
|
|
316
|
-
}
|
|
317
|
-
return installNoFocusLibs(profile).then(function(ldLibraryPath) {
|
|
318
|
-
env['LD_LIBRARY_PATH'] = ldLibraryPath + ':' + env['LD_LIBRARY_PATH'];
|
|
319
|
-
env['LD_PRELOAD'] = X_IGNORE_NO_FOCUS_LIB;
|
|
320
|
-
return exec(firefox, {args: args, env: env});
|
|
321
|
-
});
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* Returns a promise for the wire representation of this binary. Note: the
|
|
327
|
-
* FirefoxDriver only supports passing the path to the binary executable over
|
|
328
|
-
* the wire; all command line arguments and environment variables will be
|
|
329
|
-
* discarded.
|
|
330
|
-
*
|
|
331
|
-
* @return {!Promise<string>} A promise for this binary's wire representation.
|
|
332
|
-
*/
|
|
333
|
-
[Symbols.serialize]() {
|
|
334
|
-
return this.locate();
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
// PUBLIC API
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
exports.Binary = Binary;
|
|
343
|
-
exports.Channel = Channel;
|
|
344
|
-
|