RuiRC / Online-Soccer-Manager-Ad-Watch-Bot

A Bot to Automatically Watch ADs in OSM
4 stars 0 forks source link

Selenium NoSuchElementException [Fixed] #6

Closed aledaros closed 6 months ago

aledaros commented 7 months ago

I get this error, I have been using this script for a week and this is the first time this has happened to me.

selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: html body.en-GB div#page-content div#header.theme-panna-0 div.page-spacing.clearfix div#profile-dropdown.dropdown div#profile.header-menu-button.clickable-secondary.horizontal-right.vertical-center div.header-menu-button-text.hidden-xs div.header-titles div#manager-name.header-title.vertical-center bdi span.manager-name-text.ellipsis; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception Stacktrace: RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:191:5 NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:509:5 dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:136:16

RuiRC commented 7 months ago

This error happens when the program cannot find the username field to verify the login was successful, it could either happen because the field itself is obfuscated or because of some other reason. it's hard to tell without being able to visually see the problem. Typically a restart does fix the issue, you may also want to guarantee that you don't have any achievements to be claimed since the program currently isn't capable of claiming them for you and that causes it to get stuck on a loop.