gpt4 book ai didi

c# - StdOut 被垃圾邮件 'C:\fakepath' 警告整数除法可能要慢得多,如果可能,请尝试使用 uints 通过 C# 使用 Selenium

转载 作者:行者123 更新时间:2023-12-04 10:46:36 67 4
gpt4 key购买 nike

我正在使用 Selenium Firefox Web 驱动程序。它工作正常,但是当我使用“dotnet run”命令行时,命令行上出现了一些我没有解决的警告日志。我该如何解决这个问题?

console warning logs

var options = new FirefoxOptions();
options.AddArguments("--headless");
IWebDriver driver = new FirefoxDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), options);
var link = "ANY LINK";

driver.Navigate().GoToUrl(link);
driver.FindElement(By.ClassName("ANY CLASS NAME")).Click();
driver.Dispose();

由于图像链接损坏,这里有一些警告
1578640820834   addons.webextension.screenshots@mozilla.org     WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1578640820834 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1578640820834 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1578640820834 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
WARN: compileToBinary(259):
C:\fakepath(337,18-133): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(343,62-116): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(360,75-84): warning X3556: integer divides may be much slower, try using uints if possible.
C:\fakepath(363,50-59): warning X3556: integer modulus may be much slower, try using uints if possible.
C:\fakepath(383,33-90): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(174,1-6): warning X4000: use of potentially uninitialized variable (dyn_index_vec4_float4)
C:\fakepath(289,25-29): error X4576: Input array signature parameter cannot be indexed dynamically.

WARN: compileToBinary(259):
C:\fakepath(337,18-133): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(343,62-116): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(360,75-84): warning X3556: integer divides may be much slower, try using uints if possible.
C:\fakepath(363,50-59): warning X3556: integer modulus may be much slower, try using uints if possible.
C:\fakepath(383,33-90): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(174,1-6): warning X4000: use of potentially uninitialized variable (dyn_index_vec4_float4)
C:\fakepath(289,25-29): error X4576: Input array signature parameter cannot be indexed dynamically.

WARN: compileToBinary(259):
C:\fakepath(360,75-84): warning X3556: integer divides may be much slower, try using uints if possible.
C:\fakepath(363,50-59): warning X3556: integer modulus may be much slower, try using uints if possible.
C:\fakepath(174,1-6): warning X4000: use of potentially uninitialized variable (dyn_index_vec4_float4)
C:\fakepath(225,1): warning X4000: use of potentially uninitialized variable (f_distance_aa)
C:\fakepath(262,1): warning X4000: use of potentially uninitialized variable (f_do_clip)

[Child 7840, Chrome_ChildThread] WARNING: pipe error: 109: file z:/task_1572401533/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341
[Ch1578640823372 Marionette INFO Listening on port 58853
1578640829566 Marionette INFO Stopped listening on port 58853
[Parent 18380, Gecko_IOThread] WARNING: pipe error: 109: file z:/task_1572401533/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341
[Child 23108, Chrome_ChildThread] WARNING: pipe error: 109: file z:/task_1572401533/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341
[GPU
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost

最佳答案

这些警告信息...

WARN: compileToBinary(259):
C:\fakepath(337,18-133): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(343,62-116): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(360,75-84): warning X3556: integer divides may be much slower, try using uints if possible.
C:\fakepath(363,50-59): warning X3556: integer modulus may be much slower, try using uints if possible.
C:\fakepath(383,33-90): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(174,1-6): warning X4000: use of potentially uninitialized variable (dyn_index_vec4_float4)
C:\fakepath(289,25-29): error X4576: Input array signature parameter cannot be indexed dynamically.
.
WARN: compileToBinary(259):
C:\fakepath(360,75-84): warning X3556: integer divides may be much slower, try using uints if possible.
C:\fakepath(363,50-59): warning X3556: integer modulus may be much slower, try using uints if possible.
C:\fakepath(174,1-6): warning X4000: use of potentially uninitialized variable (dyn_index_vec4_float4)
C:\fakepath(225,1): warning X4000: use of potentially uninitialized variable (f_distance_aa)
C:\fakepath(262,1): warning X4000: use of potentially uninitialized variable (f_do_clip)
...是 StdOut 的结果被 C:\fakepath 发送垃圾邮件当 网络浏览器 已启用。

分析
在启用 WebRender 的情况下打开 Firefox 并且如果 stdout被抓获 warning观察到消息。这些 warning消息是一些 的结果着色器 更改 网页渲染 GPU -> ANGLE模块。
我们在以下主题中详分割析和讨论了这个问题:
  • Mozilla - Bugzilla : StdOut is spammed with 'C:\fakepath' when Webrender is enabled
  • Chrome - 错误 : Issue 765576: WARNING:angle_platform_impl.cc(51)

  • 最后通过这个 merge解决了这个问题/ commit

    解决方案
    确保这件事:
  • 将 JDK 升级到最新级别 JDK 8u222 .
  • 将 Selenium 升级到当前级别 Version 3.141.59 .
  • 将 GeckoDriver 升级到 GeckoDriver v0.26.0等级。
  • GeckoDriver 出现在所需位置。
  • GeckoDriver 对非 root 用户具有可执行权限。
  • 将 Firefox 版本升级到 火狐v70.0 水平。
  • 通过 IDE 清理项目工作区并仅使用所需的依赖项重建项目。
  • (仅限 Windows 操作系统)使用 CCleaner在执行测试套件之前和之后清除所有操作系统杂务的工具。
  • (仅限 LinuxOS)Free Up and Release the Unused/Cached Memory in Ubuntu/Linux Mint在执行测试套件之前和之后。
  • 如果您的基础 Web 客户端版本太旧,请通过 Revo Uninstaller 卸载它并安装最新的 GA 和发布版本的 Web 客户端。
  • 重新启动系统。
  • 执行您的 Test作为非root用户。
  • 总是调用 driver.quit()tearDown(){} 内优雅地关闭和销毁 WebDriver 和 Web 客户端实例的方法。
  • 关于c# - StdOut 被垃圾邮件 'C:\fakepath' 警告整数除法可能要慢得多,如果可能,请尝试使用 uints 通过 C# 使用 Selenium,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59677545/

    67 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com