<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>217206</bug_id>
          
          <creation_ts>2020-10-01 23:02:50 -0700</creation_ts>
          <short_desc>[WebDriver] Some commands check only for the current top level browsing context instead of the current browsing context</short_desc>
          <delta_ts>2020-10-02 03:51:17 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebDriver</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>217177</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>166679</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Lauro Moura">lmoura</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bburg</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1693985</commentid>
    <comment_count>0</comment_count>
    <who name="Lauro Moura">lmoura</who>
    <bug_when>2020-10-01 23:02:50 -0700</bug_when>
    <thetext>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 &quot;test_no_top_browsing_context&quot;,
both raising &quot;no such window&quot;.

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1693997</commentid>
    <comment_count>1</comment_count>
    <who name="Lauro Moura">lmoura</who>
    <bug_when>2020-10-01 23:52:22 -0700</bug_when>
    <thetext>Gardened in r267868</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1694018</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2020-10-02 03:51:17 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 217177 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>