'caller', 'callee', and 'arguments' properties may no t be accessed on strict mode functions error using Selenium and Python

Viewed 225

I'm using selenium to test an AjaxRequest:

driver.execute_script("InitiateAjaxRequest('refresh');")

but gives the following error:

selenium.common.exceptions.JavascriptException: Message: javascript error: 'caller', 'callee', and 'arguments' properties may no t be accessed on strict mode functions or the arguments objects for calls to them

I'm not sure how to disable strict mode or whether this is possible on Selenium so any help would be apprecitated :)

Edit full stack trace:

Traceback (most recent call last):  
    refresh()  
File "my_file.py" line 151, in refresh  
    driver.execute_script("InitiateAjaxRequest('refresh');")  
File "C:\Users\tompo\AppData\Local\Programs\Python\Python38-32\lib\sitepackages\selenium\webdriver\remote\webdriver.py", line 634, in execute_script  
    return self.execute(command, {  
File "C:\Users\tompo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)  
File "C:\Users\tompo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response  
    raise exception_class(message, screen, stacktrace)  
selenium.common.exceptions.JavascriptException: Message: javascript error: 'caller', 'callee', and 'arguments' properties may no
t be accessed on strict mode functions or the arguments objects for calls to them  
    (Session info: chrome=87.0.4280.141)
0 Answers
Related