Skip to content

Error While Taking Screenshots #1

@mrxehmad

Description

@mrxehmad

I am getting Issue while Taking Screen shot, selenium (firefox) opens audio files are generated but got this error after it while finding elements

If anyone knows who to fix this issue, please guide me

Finding element...
Error occurred while finding element: Message: 
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

(venv) PS C:\Users\User\Desktop\Project\RedditVideoGenerator> python .\main.py    
[0] What would instantly destroy your life just by doing it once?     9549    15.7 hours ago
[1] What brand is huge, but you don't know a single person who buys their products?     2477    8.9 hours ago
[2] What's the most embarrassing thing people would find out if you suddenly die?     2207    16.1 hours ago
[3] What's the most extreme example you've seen of "die a hero, or live long enough to become a villain'?     1833    21.4 hours ago
Input: 0
Creating video for post: What would instantly destroy your life just by doing it once?
Url: https://www.reddit.com/r/AskReddit/comments/1bg7hud/what_would_instantly_destroy_your_life_just_by/
Taking screenshots...
Traceback (most recent call last):
  File "C:\Users\User\Desktop\Project\RedditVideoGenerator\main.py", line 90, in <module>
    createVideo()
  File "C:\Users\User\Desktop\Project\RedditVideoGenerator\main.py", line 23, in createVideo
    screenshot.getPostScreenshots(fileName, script)
  File "C:\Users\User\Desktop\Project\RedditVideoGenerator\screenshot.py", line 14, in getPostScreenshots
    script.titleSCFile = __takeScreenshot(filePrefix, driver, wait)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\Project\RedditVideoGenerator\screenshot.py", line 21, in __takeScreenshot
    search = wait.until(EC.presence_of_element_located((method, handle)))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\Project\RedditVideoGenerator\venv\Lib\site-packages\selenium\webdriver\support\wait.py", line 105, in until
    raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
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

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions