gpt4 book ai didi

selenium - 双破折号 (--) 在 Selenium ChromeOptions 中意味着什么

转载 作者:行者123 更新时间:2023-12-04 11:30:57 25 4
gpt4 key购买 nike

我正在将 selenium 与 java 一起使用,并且正在使用一些 chrome 选项。但是我在不同的来源中看到了 chrome 选项的不同用法。我的意思是有些人在选项前使用双破折号,有些人不使用(例如 disable-dev-shm-usage--disable-dev-shm-usage )。这两种用法有什么区别吗?

最佳答案

根据 Command-Line Options :

Unix tradition encourages the use of command-line switches to control programs, so that options can be specified from scripts. There are three conventions to distinguish command-line options from ordinary arguments as follows:

  • The original Unix style
  • The GNU style
  • The X toolkit style

The GNU style uses option keywords (rather than keyword letters) preceded by two hyphens. It evolved years later when some of the rather elaborate GNU utilities began to run out of single-letter option keys (this constituted a patch for the symptom, not a cure for the underlying disease). It remains popular because GNU options are easier to read than the alphabet soup of older styles. GNU-style options cannot be ganged together without separating whitespace.



选择了 GNU 双连字符选项引导符,以便可以在同一命令行中明确混合传统的单字母选项和 GNU 样式的关键字选项。

关于selenium - 双破折号 (--) 在 Selenium ChromeOptions 中意味着什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60039687/

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