Browser automation using Playwright Python to periodically sign in to various accounts and export logs to a private repo https://github.com/schmwong/login-log
Run python keep-onedrive-active.py
2024-04-15 11:05:08:742073 INFO Launching browser
2024-04-15 11:05:10:196644 INFO Retrieving login page 'https://onedrive.live.com/login/'
2024-04-15 11:05:15:036745 INFO Logging in
2024-04-15 11:05:18:489412 INFO Logged in successfully
Traceback (most recent call last):
File "/home/runner/work/keep-accounts-active/keep-accounts-active/keep-onedrive-active.py", line 126, in <module>
onedrive_login(instance)
File "/home/runner/work/keep-accounts-active/keep-accounts-active/keep-onedrive-active.py", line 101, in onedrive_login
instance.redirect(href_sel="a[class*='od-QuotaBar']")
File "/home/runner/work/keep-accounts-active/keep-accounts-active/login_logger.py", line 150, in redirect
).get_attribute("href")
File "/home/runner/.local/lib/python3.10/site-packages/playwright/sync_api/_generated.py", line 16143, in get_attribute
self._sync(self._impl_obj.get_attribute(name=name, timeout=timeout))
File "/home/runner/.local/lib/python3.10/site-packages/playwright/_impl/_sync_base.py", line 115, in _sync
return task.result()
File "/home/runner/.local/lib/python3.10/site-packages/playwright/_impl/_locator.py", line 409, in get_attribute
return await self._frame.get_attribute(
File "/home/runner/.local/lib/python3.10/site-packages/playwright/_impl/_frame.py", line 628, in get_attribute
return await self._channel.send("getAttribute", locals_to_params(locals()))
File "/home/runner/.local/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 59, in send
return await self._connection.wrap_api_call(
File "/home/runner/.local/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 5[13](https://github.com/schmwong/keep-accounts-active/actions/runs/8687997111/job/23822687846#step:6:14), in wrap_api_call
raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None
playwright._impl._errors.TimeoutError: Locator.get_attribute: Timeout 30000ms exceeded.
Call log:
waiting for locator("a[class*='od-QuotaBar']")
Error: Process completed with exit code 1.
GitHub Actions log output after update:
python keep-onedrive-active.py
shell: /usr/bin/bash -e {0}
env:
WORKFLOW_TOKEN: ***
EPICGAMES:
MEGA:
ONEDRIVE: ***
USR_YAHOO_1:
PWD_YAHOO_1:
SMU:
2024-04-15 13:02:36:376886 INFO Launching browser
2024-04-15 13:02:37:663217 INFO Retrieving login page 'https://onedrive.live.com/login/'
2024-04-15 13:02:42:100748 INFO Logging in
2024-04-15 13:02:44:748833 INFO Logged in successfully
2024-04-15 13:02:47:453848 INFO Getting storage details from 'https://onedrive.live.com#v=managestorage'
2024-04-15 13:02:50:076095 DEBUG Profile name: P .
2024-04-15 13:02:50:076191 DEBUG Email: ***
2024-04-15 13:02:50:076257 DEBUG Plan: Free
2024-04-15 13:02:50:076307 DEBUG Total used: 0.2 GB / 5 GB
2024-04-15 13:02:50:076362 INFO Tasks complete. Closing browser
2024-04-15 13:02:50:790675 INFO Launching browser
2024-04-15 13:02:51:892620 INFO Retrieving login page 'https://onedrive.live.com/login/'
2024-04-15 13:02:56:221277 INFO Logging in
2024-04-15 13:02:59:156623 INFO Logged in successfully
2024-04-15 13:03:02:310537 INFO Getting storage details from 'https://onedrive.live.com#v=managestorage'
2024-04-15 13:03:04:924557 DEBUG Profile name: Trove Admin
2024-04-15 13:03:04:924660 DEBUG Email: ***
2024-04-15 13:03:04:924716 DEBUG Plan: Free
2024-04-15 13:03:04:924767 DEBUG Total used: < 0.1 GB / 5 GB
2024-04-15 13:03:04:924817 INFO Tasks complete. Closing browser
GitHub Actions log output with error traceback:
GitHub Actions log output after update: