添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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 [🐛 Bug]: selenium.common.exceptions.JavascriptException: Message: javascript error: Object.hasOwn is not a function #12090 [🐛 Bug]: selenium.common.exceptions.JavascriptException: Message: javascript error: Object.hasOwn is not a function #12090 iniyavans opened this issue May 24, 2023 · 3 comments

What happened?

While running the selenium code getting the "selenium.common.exceptions.JavascriptException: Message: javascript error: Object.hasOwn is not a function (Session info: chrome=113.0.5672.126)" Error.

I'll just upgrade my Chrome driver version, after that only that issue come

How can we reproduce the issue?

Execute the below code with a chrome driver version as a 113
driver.execute_script('arguments[0].click()', element)

Relevant log output

def test_BXA002():
>       testData.setupWallet()
main.py:9: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
testData.py:38: in setupWallet
    metamask.metamaskSetup(recovery_phrase, wallet_password)
metamask.py:41: in metamaskSetup
    wait.until(EC.presence_of_element_located((By.XPATH, "//button[text()='Get Started']"))).click()
../venv/lib/python3.11/site-packages/selenium/webdriver/remote/webelement.py:94: in click
    self._execute(Command.CLICK_ELEMENT)
../venv/lib/python3.11/site-packages/selenium/webdriver/remote/webelement.py:403: in _execute
    return self._parent.execute(command, params)
../venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py:440: in execute
    self.error_handler.check_response(response)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x102493e50>
response = {'status': 500, 'value': '{"value":{"error":"javascript error","message":"javascript error: Object.hasOwn is not a fun...ff802a2a4e1 _pthread_start + 125\\n25  libsystem_pthread.dylib             0x00007ff802a25f6b thread_start + 15\\n"}}'}

Operating System

macOs

Selenium version

Selenium 4

What are the browser(s) and version(s) where you see this issue?

Chrome 113

What are the browser driver(s) and version(s) where you see this issue?

Chrome Driver 113.0.5672.126

Are you using Selenium Grid?

No response

@iniyavans , thank you for creating this issue. We will troubleshoot it as soon as we can.

Info for maintainers Triage this issue by using labels. If information is missing, add a helpful comment and then I-issue-template label. If the issue is a question, add the I-question label. If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label. If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue. After troubleshooting the issue, please add the R-awaiting answer label. Thank you!