英文:
INFO: Detected dialect: W3C using Selenium Java
问题
我有一个网络自动化项目,它在一个网站上运行,执行新用户的注册并选择多个项目。所有元素都是通过findElement(By )来检测的。突然间,它完全停止工作,无法找到任何元素。我的Chrome已经打开,但没有进一步的操作。出现了以下错误:
ChromeDriver启动成功。
22, 2020 2:57:48 org.openqa.selenium.remote.ProtocolHandshake createSession
INFO:检测到的语言版本:W3C
我是否缺少某个依赖?这个流程之前运行得非常好。
英文:
I have a web automation project that runs over a website, performs registration of new user and chooses several items. all elements are detected by findElement(By ).
Suddenly it stopped working completely and not able to find any of the elements.
My chrome is opened by no further actions are taken
the following error appears:
ChromeDriver was started successfully.
22, 2020 2:57:48 org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Is there a dependency i am missing? the flow worked perfectly fine.
答案1
得分: 3
Dialect
-------
编程语言或数据交换语言的[方言](https://en.wikipedia.org/wiki/Programming_language#Dialects,_flavors_and_implementations)是该语言的一个(相对较小的)变体或扩展,不会改变其固有性质。
----------
Enum Dialect
------------
[`public enum Dialect`](https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/remote/Dialect.html)位于`org.openqa.selenium.remote`中,扩展了`java.lang.Enum<Dialect>`。此枚举支持两个常量:
- [`OSS`](https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/remote/Dialect.html#OSS)
public static final Dialect OSS
- [`W3C`](https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/remote/Dialect.html#W3C)
public static final Dialect W3C
[ChromeDriver](https://stackoverflow.com/questions/59909654/how-does-chrome-driver-interact-with-chrome-browser/59927747#59927747)和[tag:google-chrome]以前使用**`OSS`**方言。但是现在,作为实现[W3C WebDriver标准](https://w3c.github.io/webdriver/)的独立服务器,_ChromeDriver_。
因此,现在当您使用[ChromeDriver](https://stackoverflow.com/questions/48079120/what-is-the-difference-between-chromedriver-and-webdriver-in-selenium/48080871#48080871)启动_Google Chrome浏览上下文_,即_Chrome浏览器_会观察到`INFO`:
INFO: 检测到方言:W3C
----------
结论
----------
此日志消息不是错误,而是信息。
英文:
Dialect
A dialect of a programming language or a data exchange language is a (relatively small) variation or extension of the language that does not change its intrinsic nature.
Enum Dialect
public enum Dialect
in org.openqa.selenium.remote
extends java.lang.Enum<Dialect>
. This enum supports two constants:
ChromeDriver and [tag:google-chrome] earlier used the OSS
dialect. But now ChromeDriver as a standalone server that implements the W3C WebDriver standard.
Hence now when you initiate a Google Chrome Browsing Context i.e. Chrome Browser session using ChromeDriver you observe the INFO
:
INFO: Detected dialect: W3C
Conclusion
This log message isn't an error and is an information.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论