-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[🐛 Bug]: selenium.common.exceptions.JavascriptException: Message: javascript error: Object.hasOwn is not a function #12078
Comments
@qingfeng520, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
Hi, @qingfeng520. Either a complete code snippet and URL/HTML (if more than one file is needed, provide a GitHub repo and instructions to run the code), the specific versions used, or a more detailed description to help us understand the issue. Note: If you cannot share your code and URL/HTML, any complete code snippet and URL/HTML that reproduces the issue is good enough. Reply to this issue when all information is provided, thank you. |
We closed a similar issue last week because there was no way of reproducing it. |
@diemol I'm also getting the same issue now While running the below code
|
@iniyavans can you please provide a complete script to reproduce the issue? Otherwise it will stale and end up being closed. |
@diemol will share my repo shortly! |
EXTENSION_PATH = os.path.abspath('..') + '/metamask/extension_metamask.crx' chromeDriver = os.path.abspath('..') + '/metamask/chromedriver/chromedriverV113' chrome_options = Options() chrome_options.add_extension(EXTENSION_PATH) chrome_options.add_experimental_option("detach", True) chrome_service = Service(chromeDriver) driver = webdriver.Chrome(options=chrome_options, service=chrome_service) driver.maximize_window() driver.get("https://www.google.com/") wait = WebDriverWait(driver, 20) wait.until(EC.number_of_windows_to_be(2)) driver.switch_to.window(driver.window_handles[1]) wait.until(EC.presence_of_element_located((By.XPATH, "//button[text()='Get Started']"))).click() @diemol I used above code |
|
Two questions:
|
get the file from the below link @diemol https://drive.google.com/file/d/1N_tBBT7S5QKdihD4oPy2MyMj-5Qv8tV9/view?usp=sharing @diemol |
Answer for Q2: The basic selenium code will be working fine, I need to add the above extension file to automate my project. @diemol |
OK, a bit of googling shows me that this is the browser extension And if it only happens with that extension, there is not much we can do. Have you reached out to them? |
No @diemol We just add the extension during the browser launch, And also the same code worked fine before. The issue comes after updating the Chrome version to 113. |
I understand, but Selenium is doing its job of launching the browser through ChromeDriver and loading the extension. The code in Selenium has not changed. So you either need to check with the extension maintainers or raise an issue to the ChromeDriver folks. |
Okay @diemol, Thanks! |
I will leave the links where you can report this, but still, I am not sure if this is something with the extension or the browser. |
Hi, @qingfeng520. You can see if the feature is passing in the Web Platform Tests. If it is something new, please create an issue with the ChromeDriver team. |
Forgive my ignorance, but in that page you listed, how do I actually see if the issue was fixed in Chromedriver? Does anyone know if this was resolved? |
@disposablecarcass looks like a ticket was opened, but couldn't be reproduced with the provided example so it got closed: https://bugs.chromium.org/p/chromedriver/issues/detail?id=4446 If you have a reproducible example, please open a new ticket |
thanks. I read thru his instructions in the link you provided and that user describes the issue perfectly. do you know what issues they had reproducing this? did they just not want to install the extension? if so I could upload my whole python project with the crx already moved to the project root. would that help? please let me know if that would be sufficient for someone to reproduce the error. thanks Edtit: I've created a new issue: https://bugs.chromium.org/p/chromedriver/issues/detail?id=4660 |
You'd need to ask that in the Chrome bug tracker. |
Because lava moat of metamask , you need disable it https://community.metamask.io/t/can-i-disable-lavamoat/24845/2 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What happened?
when run the code the code where report a bug:
driver.find_elements(By.XPATH, '//*[@id="app-content"]/div/div[3]/div/div/button')
How can we reproduce the issue?
Relevant log output
Operating System
Windows11
Selenium version
Python 3.11.2
What are the browser(s) and version(s) where you see this issue?
Chrome 113.0.5672.127
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 113.0.5672.63
Are you using Selenium Grid?
No response
The text was updated successfully, but these errors were encountered: