Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[do not merge] debug PR 38208 #38292

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions webdriver/tests/element_clear/clear.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def test_input_disabled(session, inline, type):
assert_error(response, "invalid element state")



@pytest.mark.parametrize("type",
["number",
"range",
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/element_click/click.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def element_click(session, element):
element_id=element.id))



def test_null_response_value(session, inline):
session.url = inline("<p>foo")
element = session.find.css("p", all=False)
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/element_click/shadow_dom.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def element_click(session, element):
element_id=element.id))



@pytest.fixture
def get_checkbox_dom(inline):
return inline("""
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/element_send_keys/send_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def element_send_keys(session, element, text):
{"text": text})



def test_null_parameter_value(session, http, inline):
session.url = inline("<input>")
element = session.find.css("input", all=False)
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/execute_async_script/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def test_null(session):
assert actual[1] == value



@pytest.mark.parametrize("value, expected_type", [
(True, "boolean"),
(42, "number"),
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/execute_async_script/execute_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from . import execute_async_script



def test_null_parameter_value(session, http):
path = "/session/{session_id}/execute/async".format(**vars(session))
with http.post(path, None) as response:
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/execute_async_script/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from . import execute_async_script



PAGE_DATA = """
<div id="deep"><p><span></span></p><br/></div>
<div id="text-node"><p></p>Lorem</div>
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/execute_script/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from . import execute_script



def test_null(session):
value = None
result = execute_script(session, "return [arguments[0] === null, arguments[0]]", args=[value])
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/execute_script/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from . import execute_script



def test_null_parameter_value(session, http):
path = "/session/{session_id}/execute/sync".format(**vars(session))
with http.post(path, None) as response:
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/execute_script/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from . import execute_script



PAGE_DATA = """
<div id="deep"><p><span></span></p><br/></div>
<div id="text-node"><p></p>Lorem</div>
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/find_element/find.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from tests.support.asserts import assert_error, assert_same_element, assert_success



def find_element(session, using, value):
return session.transport.send(
"POST", "session/{session_id}/element".format(**vars(session)),
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/find_element_from_element/find.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def find_element(session, element_id, using, value):
{"using": using, "value": value})



def test_null_parameter_value(session, http, inline):
session.url = inline("<div><a href=# id=linkText>full link text</a></div>")
element = session.find.css("div", all=False)
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/find_element_from_shadow_root/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest


@pytest.fixture
def get_shadow_page():
def get_shadow_page(shadow_content):
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/find_element_from_shadow_root/find.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def find_element(session, shadow_id, using, value):
{"using": using, "value": value})



def test_null_parameter_value(session, http, inline, get_shadow_page):
session.url = inline(get_shadow_page("<div><a href=# id=linkText>full link text</a></div>"))
custom_element = session.find.css("custom-shadow-element", all=False)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
)



def find_element(session, shadow_id, using, value):
return session.transport.send(
"POST", "session/{session_id}/shadow/{shadow_id}/element".format(
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/find_elements/find.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from tests.support.asserts import assert_error, assert_same_element, assert_success



def find_elements(session, using, value):
return session.transport.send(
"POST", "session/{session_id}/elements".format(**vars(session)),
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/find_elements_from_element/find.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from tests.support.asserts import assert_error, assert_same_element, assert_success



def find_elements(session, element_id, using, value):
return session.transport.send(
"POST", "session/{session_id}/element/{element_id}/elements".format(
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/find_elements_from_shadow_root/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest


@pytest.fixture
def get_shadow_page():
def get_shadow_page(shadow_content):
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/find_elements_from_shadow_root/find.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from tests.support.asserts import assert_error, assert_same_element, assert_success



def find_elements(session, shadow_id, using, value):
return session.transport.send(
"POST", "session/{session_id}/shadow/{shadow_id}/elements".format(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
)



def find_elements(session, shadow_id, using, value):
return session.transport.send(
"POST", "session/{session_id}/shadow/{shadow_id}/elements".format(
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/get_computed_label/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def get_computed_label(session, element_id):
element_id=element_id))



def test_no_browsing_context(session, closed_frame):
response = get_computed_label(session, "foo")
assert_error(response, "no such window")
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/get_computed_role/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from tests.support.asserts import assert_error, assert_success



def get_computed_role(session, element_id):
return session.transport.send(
"GET", "session/{session_id}/element/{element_id}/computedrole".format(
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/get_element_attribute/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def get_element_attribute(session, element, attr):
attr=attr))



def test_no_top_browsing_context(session, closed_window):
original_handle, element = closed_window
response = get_element_attribute(session, element.id, "id")
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/get_element_css_value/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def get_element_css_value(session, element_id, prop):
)



def test_no_top_browsing_context(session, closed_window):
original_handle, element = closed_window
response = get_element_css_value(session, element.id, "display")
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/get_element_property/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def get_element_property(session, element_id, prop):
prop=prop))



def test_no_top_browsing_context(session, closed_window):
original_handle, element = closed_window
response = get_element_property(session, element.id, "value")
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/get_element_rect/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def get_element_rect(session, element_id):
)



def test_no_top_browsing_context(session, closed_window):
original_handle, element = closed_window
response = get_element_rect(session, element.id)
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/get_element_shadow_root/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest


@pytest.fixture
def checkbox_dom(inline):
return """
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/get_element_shadow_root/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from tests.support.asserts import assert_error, assert_same_element, assert_success



def get_shadow_root(session, element_id):
return session.transport.send(
"GET", "session/{session_id}/element/{element_id}/shadow".format(
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/get_element_shadow_root/user_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from tests.support.asserts import assert_error, assert_success, assert_dialog_handled



def get_shadow_root(session, element_id):
return session.transport.send(
"GET", "session/{session_id}/element/{element_id}/shadow".format(
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/get_element_tag_name/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from tests.support.asserts import assert_error, assert_success



def get_element_tag_name(session, element_id):
return session.transport.send(
"GET", "session/{session_id}/element/{element_id}/name".format(
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/get_element_text/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from tests.support.asserts import assert_error, assert_success



def get_element_text(session, element_id):
return session.transport.send(
"GET", "session/{session_id}/element/{element_id}/text".format(
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/is_element_enabled/enabled.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from tests.support.asserts import assert_error, assert_success



def is_element_enabled(session, element_id):
return session.transport.send(
"GET",
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/is_element_selected/selected.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from tests.support.asserts import assert_error, assert_success



@pytest.fixture
def check_doc():
return """
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/perform_actions/pointer_mouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from webdriver.error import InvalidArgumentException, NoSuchWindowException, StaleElementReferenceException


from tests.perform_actions.support.mouse import get_inview_center, get_viewport_rect
from tests.perform_actions.support.refine import get_events
from tests.support.asserts import assert_move_to_coordinates
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/perform_actions/pointer_pen.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from tests.perform_actions.support.refine import get_events



def test_null_response_value(session, pen_chain):
value = pen_chain.click().perform()
assert value is None
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/perform_actions/pointer_touch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def test_null_response_value(session, touch_chain):
assert value is None



def test_no_top_browsing_context(session, closed_window, touch_chain):
with pytest.raises(NoSuchWindowException):
touch_chain.click().perform()
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/support/fixtures_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from tests.support.sync import Poll



@pytest.fixture
def add_event_listeners(session):
"""Register listeners for tracked events on element."""
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/switch_to_frame/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from tests.support.asserts import assert_error, assert_same_element, assert_success



def switch_to_frame(session, frame):
return session.transport.send(
"POST", "session/{session_id}/frame".format(**vars(session)),
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/switch_to_frame/switch_webelement.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def switch_to_frame(session, frame):
session=session)



def frameset(inline, *docs):
frames = list(map(lambda doc: "<frame src='{}'></frame>".format(inline(doc)), docs))
return "<frameset rows='{}'>\n{}</frameset>".format(len(frames) * "*,", "\n".join(frames))
Expand Down
1 change: 1 addition & 0 deletions webdriver/tests/take_element_screenshot/screenshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from . import element_dimensions



def take_element_screenshot(session, element_id):
return session.transport.send(
"GET",
Expand Down