Bug 217206 - [WebDriver] Some commands check only for the current top level browsing context instead of the current browsing context
Summary: [WebDriver] Some commands check only for the current top level browsing conte...
Status: RESOLVED DUPLICATE of bug 217177
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: gtk-webdriver
  Show dependency treegraph
 
Reported: 2020-10-01 23:02 PDT by Lauro Moura
Modified: 2020-10-02 03:51 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lauro Moura 2020-10-01 23:02:50 PDT
After the latest update, a number of browsing context tests are failing:

imported/w3c/webdriver/tests/execute_async_script/execute_async.py::test_no_browsing_context
imported/w3c/webdriver/tests/get_element_tag_name/get.py::test_no_browsing_context
imported/w3c/webdriver/tests/switch_to_window/switch.py::test_no_browsing_context
imported/w3c/webdriver/tests/find_elements/find.py::test_no_browsing_context
imported/w3c/webdriver/tests/execute_script/execute.py::test_no_browsing_context
imported/w3c/webdriver/tests/get_element_rect/get.py::test_no_browsing_context
imported/w3c/webdriver/tests/delete_cookie/delete.py::test_no_browsing_context
imported/w3c/webdriver/tests/switch_to_frame/switch.py::test_no_browsing_context[0]
imported/w3c/webdriver/tests/switch_to_frame/switch.py::test_no_browsing_context[id2]
imported/w3c/webdriver/tests/get_element_property/get.py::test_no_browsing_context
imported/w3c/webdriver/tests/get_page_source/source.py::test_no_browsing_context
imported/w3c/webdriver/tests/find_element_from_element/find.py::test_no_browsing_context
imported/w3c/webdriver/tests/element_click/click.py::test_no_browsing_context
imported/w3c/webdriver/tests/close_window/close.py::test_no_browsing_context
imported/w3c/webdriver/tests/element_send_keys/send_keys.py::test_no_browsing_context
imported/w3c/webdriver/tests/add_cookie/add.py::test_no_browsing_context
imported/w3c/webdriver/tests/delete_all_cookies/delete.py::test_no_browsing_context
imported/w3c/webdriver/tests/get_element_text/get.py::test_no_browsing_context
imported/w3c/webdriver/tests/get_element_attribute/get.py::test_no_browsing_context
imported/w3c/webdriver/tests/is_element_enabled/enabled.py::test_no_browsing_context
imported/w3c/webdriver/tests/get_named_cookie/get.py::test_no_browsing_context
imported/w3c/webdriver/tests/find_element/find.py::test_no_browsing_context
imported/w3c/webdriver/tests/perform_actions/none.py::test_no_browsing_context
imported/w3c/webdriver/tests/perform_actions/key.py::test_no_browsing_context
imported/w3c/webdriver/tests/perform_actions/pointer.py::test_no_browsing_context
imported/w3c/webdriver/tests/get_element_css_value/get.py::test_no_browsing_context
imported/w3c/webdriver/tests/get_active_element/get.py::test_no_browsing_context
imported/w3c/webdriver/tests/find_elements_from_element/find.py::test_no_browsing_context
imported/w3c/webdriver/tests/is_element_selected/selected.py::test_no_browsing_context
imported/w3c/webdriver/tests/element_clear/clear.py::test_no_browsing_context

These tests have in common that they usually go in pair with a "test_no_top_browsing_context",
both raising "no such window".

It was updated in WPT from this mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1493108

In fact, in the spec[1], these commands check for the current browsing context while the current code in Session.cpp usually checks only for the current *top level* context and use m_currentBrowsingContext only in the context of frame switching, etc.


[1] https://www.w3.org/TR/2020/WD-webdriver2-20200610/#get-element-rect
Comment 1 Lauro Moura 2020-10-01 23:52:22 PDT
Gardened in r267868
Comment 2 Carlos Garcia Campos 2020-10-02 03:51:17 PDT

*** This bug has been marked as a duplicate of bug 217177 ***