abel-vs / abel-vs/browser-energy-measurer

Bug: Youtube scenario crash with firefox

未关闭
#2 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
4
派生
2
PR 合并指标
30 天内没有已合并 PR

描述

Hello,

I'm trying to reproduce the experimentation but I encountered the following error:

```txt
############### https://www.youtube.com/watch?v=k2qgadSvNyU
Traceback (most recent call last):
File "src/run_linux_tlpc.py", line 76, in
run(driver_per_name[name_driver], name_driver, measure_sec=False)
File "src/run_linux_tlpc.py", line 58, in run
scenario()
File "src/run_linux_tlpc.py", line 52, in
lambda: youtube.visit(driver),
File "/home/benjamin/workspace/browser-energy-measurer/src/scenarios/youtube.py", line 40, in visit
driver.execute_script("""
File "/home/benjamin/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 879, in execute_script
return self.execute(command, {
File "/home/benjamin/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 425, in execute
self.error_handler.check_response(response)
File "/home/benjamin/.local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.JavascriptException: Message: TypeError: l is undefined
Stacktrace:
@https://www.youtube.com/watch?v=k2qgadSvNyU:4:5
@https://www.youtube.com/watch?v=k2qgadSvNyU:6:8
```

It seems that the scenario `Youtube` is failing somehow on Firefox.

On my side, I am on Linux and my `Youtube` inside Firefox is using the black theme while Chrome runs the white theme and it works perfectly. It might be related.
The error occurs when the bot must agree to the cookies.

I am investigating.

Thank you.

Best.

贡献指南

这个仓库没有索引到贡献指南

调研方向

崩溃发生在 src/scenarios/youtube.py 第 40 行的 driver.execute_script 调用期间,可能是在使用 Firefox 处理 YouTube 上的 Cookie 时发生的。首先检查 youtube.py 场景,尤其是 visit 函数和正在执行的 JavaScript。使用 Linux 上的 Firefox 在本地重现该错误,重点关注 Cookie 同意交互以及主题差异。检查脚本是否假定页面元素在不同主题之间存在差异。

由索引模型根据 Issue 内容生成。

评估

领域
testing-qa
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。