Skip to content

Commit cf92e82

Browse files
committed
Adding arguments examples to Edge
[deploy site]
1 parent feeb366 commit cf92e82

5 files changed

Lines changed: 127 additions & 5 deletions

File tree

examples/ruby/spec/browsers/edge_spec.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,16 @@
33
require 'spec_helper'
44

55
RSpec.describe 'Edge' do
6+
let(:driver) { start_session }
7+
68
it 'basic options' do
79
options = Selenium::WebDriver::Options.edge
810
@driver = Selenium::WebDriver.for :edge, options: options
911
end
10-
end
12+
13+
it 'add arguments' do
14+
options = Selenium::WebDriver::Options.edge(args: ['--headless=new'])
15+
@driver = Selenium::WebDriver.for :edge, options: options
16+
@driver.get('https://www.google.com')
17+
end
18+
end

website_and_docs/content/documentation/webdriver/browsers/edge.en.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Starting an Edge session with basic defined options looks like this:
2626
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Browsers/EdgeTest.cs#L12-L13" >}}
2727
{{< /tab >}}
2828
{{< tab header="Ruby" >}}
29-
{{< gh-codeblock path="/examples/ruby/spec/browsers/edge_spec.rb#L7-L8" >}}
29+
{{< gh-codeblock path="/examples/ruby/spec/browsers/edge_spec.rb#L9-L10" >}}
3030
{{< /tab >}}
3131
{{< tab header="JavaScript" >}}
3232
{{< gh-codeblock path="/examples/javascript/test/getting_started/openEdgeTest.spec.js#L11-L16">}}
@@ -36,6 +36,35 @@ Starting an Edge session with basic defined options looks like this:
3636
{{< /tab >}}
3737
{{< /tabpane >}}
3838

39+
### Arguments
40+
41+
The `args` parameter is for a list of [Command Line Switches](https://peter.sh/experiments/chromium-command-line-switches/)
42+
used when starting the browser.
43+
Commonly used args include `--start-maximized` and `--headless=new`
44+
45+
Add an argument to options:
46+
47+
{{< tabpane code=false langEqualsHeader=true >}}
48+
{{< tab header="Java" >}}
49+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L24-L26" >}}
50+
{{< /tab >}}
51+
{{% tab header="Python" %}}
52+
{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L12-L13" >}}
53+
{{% /tab %}}
54+
{{< tab header="CSharp" >}}
55+
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Browsers/EdgeTest.cs#L24-L26" >}}
56+
{{< /tab >}}
57+
{{< tab header="Ruby" >}}
58+
{{< gh-codeblock path="/examples/ruby/spec/browsers/edge_spec.rb#L14-L15" >}}
59+
{{< /tab >}}
60+
{{< tab header="JavaScript" >}}
61+
{{< badge-code >}}
62+
{{< /tab >}}
63+
{{< tab header="Kotlin" >}}
64+
{{< badge-code >}}
65+
{{< /tab >}}
66+
{{< /tabpane >}}
67+
3968
## Internet Explorer Compatibility Mode
4069

4170
Microsoft Edge can be driven in "Internet Explorer Compatibility Mode", which uses

website_and_docs/content/documentation/webdriver/browsers/edge.ja.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Chromeと同様に、edgedriverのメジャー バージョン番号は、Edge
2626
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Browsers/EdgeTest.cs#L12-L13" >}}
2727
{{< /tab >}}
2828
{{< tab header="Ruby" >}}
29-
{{< gh-codeblock path="/examples/ruby/spec/browsers/edge_spec.rb#L7-L8" >}}
29+
{{< gh-codeblock path="/examples/ruby/spec/browsers/edge_spec.rb#L9-L10" >}}
3030
{{< /tab >}}
3131
{{< tab header="JavaScript" >}}
3232
{{< gh-codeblock path="/examples/javascript/test/getting_started/openEdgeTest.spec.js#L11-L16">}}
@@ -36,6 +36,34 @@ Chromeと同様に、edgedriverのメジャー バージョン番号は、Edge
3636
{{< /tab >}}
3737
{{< /tabpane >}}
3838

39+
### 引数
40+
41+
`args` パラメータは、ブラウザの起動時に使用される[コマンドラインスイッチ](https://peter.sh/experiments/chromium-command-line-switches/)のリストです。
42+
一般的に使用される引数には、`--start-maximized` および `--headless=new` が含まれます。
43+
44+
オプションに引数を追加します。
45+
46+
{{< tabpane code=false langEqualsHeader=true >}}
47+
{{< tab header="Java" >}}
48+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L24-L26" >}}
49+
{{< /tab >}}
50+
{{% tab header="Python" %}}
51+
{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L12-L13" >}}
52+
{{% /tab %}}
53+
{{< tab header="CSharp" >}}
54+
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Browsers/EdgeTest.cs#L24-L26" >}}
55+
{{< /tab >}}
56+
{{< tab header="Ruby" >}}
57+
{{< gh-codeblock path="/examples/ruby/spec/browsers/edge_spec.rb#L14-L15" >}}
58+
{{< /tab >}}
59+
{{< tab header="JavaScript" >}}
60+
{{< badge-code >}}
61+
{{< /tab >}}
62+
{{< tab header="Kotlin" >}}
63+
{{< badge-code >}}
64+
{{< /tab >}}
65+
{{< /tabpane >}}
66+
3967
## Internet Explorer Compatibility モード
4068

4169
Microsoft Edge は、Internet Explorer ドライバークラスを Microsoft Edgeと組み合わせて使用する

website_and_docs/content/documentation/webdriver/browsers/edge.pt-br.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Este é um exemplo de como iniciar uma sessão Edge com um conjunto de opções
2626
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Browsers/EdgeTest.cs#L12-L13" >}}
2727
{{< /tab >}}
2828
{{< tab header="Ruby" >}}
29-
{{< gh-codeblock path="/examples/ruby/spec/browsers/edge_spec.rb#L7-L8" >}}
29+
{{< gh-codeblock path="/examples/ruby/spec/browsers/edge_spec.rb#L9-L10" >}}
3030
{{< /tab >}}
3131
{{< tab header="JavaScript" >}}
3232
{{< gh-codeblock path="/examples/javascript/test/getting_started/openEdgeTest.spec.js#L11-L16">}}
@@ -36,6 +36,34 @@ Este é um exemplo de como iniciar uma sessão Edge com um conjunto de opções
3636
{{< /tab >}}
3737
{{< /tabpane >}}
3838

39+
### Argumentos
40+
41+
O parametro `args` é usado para indicar uma lista de [opções](https://peter.sh/experiments/chromium-command-line-switches/) ao iniciar o navegador.
42+
Opções mais frequentes incluem `--start-maximized` e `--headless=new`
43+
44+
Adicione uma opção:
45+
46+
{{< tabpane code=false langEqualsHeader=true >}}
47+
{{< tab header="Java" >}}
48+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L24-L26" >}}
49+
{{< /tab >}}
50+
{{% tab header="Python" %}}
51+
{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L12-L13" >}}
52+
{{% /tab %}}
53+
{{< tab header="CSharp" >}}
54+
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Browsers/EdgeTest.cs#L24-L26" >}}
55+
{{< /tab >}}
56+
{{< tab header="Ruby" >}}
57+
{{< gh-codeblock path="/examples/ruby/spec/browsers/edge_spec.rb#L14-L15" >}}
58+
{{< /tab >}}
59+
{{< tab header="JavaScript" >}}
60+
{{< badge-code >}}
61+
{{< /tab >}}
62+
{{< tab header="Kotlin" >}}
63+
{{< badge-code >}}
64+
{{< /tab >}}
65+
{{< /tabpane >}}
66+
3967
## Modo compatibilidade Internet Explorer
4068

4169
O Microsoft Edge pode ser controlado em modo "compatibilidade Internet Explorer", são usadas

website_and_docs/content/documentation/webdriver/browsers/edge.zh-cn.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ description: >-
2626
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Browsers/EdgeTest.cs#L12-L13" >}}
2727
{{< /tab >}}
2828
{{< tab header="Ruby" >}}
29-
{{< gh-codeblock path="/examples/ruby/spec/browsers/edge_spec.rb#L7-L8" >}}
29+
{{< gh-codeblock path="/examples/ruby/spec/browsers/edge_spec.rb#L9-L10" >}}
3030
{{< /tab >}}
3131
{{< tab header="JavaScript" >}}
3232
{{< gh-codeblock path="/examples/javascript/test/getting_started/openEdgeTest.spec.js#L11-L16">}}
@@ -36,6 +36,35 @@ description: >-
3636
{{< /tab >}}
3737
{{< /tabpane >}}
3838

39+
### Arguments
40+
41+
The `args` parameter is for a list of [Command Line Switches](https://peter.sh/experiments/chromium-command-line-switches/)
42+
used when starting the browser.
43+
Commonly used args include `--start-maximized` and `--headless=new`
44+
45+
Add an argument to options:
46+
47+
{{< tabpane code=false langEqualsHeader=true >}}
48+
{{< tab header="Java" >}}
49+
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java#L24-L26" >}}
50+
{{< /tab >}}
51+
{{% tab header="Python" %}}
52+
{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L12-L13" >}}
53+
{{% /tab %}}
54+
{{< tab header="CSharp" >}}
55+
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Browsers/EdgeTest.cs#L24-L26" >}}
56+
{{< /tab >}}
57+
{{< tab header="Ruby" >}}
58+
{{< gh-codeblock path="/examples/ruby/spec/browsers/edge_spec.rb#L14-L15" >}}
59+
{{< /tab >}}
60+
{{< tab header="JavaScript" >}}
61+
{{< badge-code >}}
62+
{{< /tab >}}
63+
{{< tab header="Kotlin" >}}
64+
{{< badge-code >}}
65+
{{< /tab >}}
66+
{{< /tabpane >}}
67+
3968
## Internet Explorer 兼容模式
4069

4170
微软Edge可以被"Internet Explorer兼容模式"驱动,

0 commit comments

Comments
 (0)