Edgewall Software
Modify

Opened 2 months ago

Last modified 7 weeks ago

#13902 assigned defect

javascript_disabled decorator not working in functional-tests

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: next-stable-1.6.x
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Investigating it, it is unable to disable JavaScript after starting the browser session with the latest version of Firefox. No workaround.

======================================================================
FAIL: runTest (trac.ticket.tests.functional.admin.TestAdminComponentNonRemoval.runTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\trac\trac\trac\tests\functional\better_twill.py", line 363, in wrapper
    prev_prefs = self.set_prefs({'javascript.enabled': False})
  File "D:\a\trac\trac\trac\tests\functional\better_twill.py", line 388, in set_prefs
    prev = driver.execute_script("""\
        var prefs = Components.classes
    ...<35 lines>...
        return prev;
    """, values)
  File "C:\Users\runneradmin\AppData\Local\venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 578, in execute_script
    return self.execute(command, {"script": script, "args": converted_args})["value"]
           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\runneradmin\AppData\Local\venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 468, in execute
    self.error_handler.check_response(response)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "C:\Users\runneradmin\AppData\Local\venv\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 232, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: ExecuteScript and ExecuteAsyncScript are not supported for parent process browsing contexts: 60
Stacktrace:
RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:169:5
UnsupportedOperationError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:961:5
#execute@chrome://remote/content/marionette/driver.sys.mjs:3967:13

Attachments (0)

Change History (2)

comment:1 by Jun Omae, 2 months ago

Skip the tests with javascript_disabled decorator in [17927]. The tests will be removed or replaced later….

comment:2 by Jun Omae, 7 weeks ago

Milestone: 1.6.1next-stable-1.6.x

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain Jun Omae.
The ticket will be disowned. Next status will be 'new'.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.