Skip to content

Commit adcf706

Browse files
titusfortnerdiemol
andauthored
More wiki (SeleniumHQ#907) [deploy site]
* moving docs from wiki that require translations * reorganizing legacy section to move more docs from wiki Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
1 parent 08e0077 commit adcf706

File tree

76 files changed

+1906
-161
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1906
-161
lines changed

website_and_docs/content/documentation/about/history.en.md

+238
Large diffs are not rendered by default.

website_and_docs/content/documentation/grid/components.en.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ By default, the Node auto-registers all browser drivers available on the path of
5252
the machine where it runs. It also creates one slot per available CPU for Chromium
5353
based browsers and Firefox. For Safari and Internet Explorer, only one slot is created.
5454
Through a specific configuration, it can run sessions in Docker containers or relay commands.
55-
You can see more configuration details in the next [section]({{< ref "setting_up_your_own_grid.md" >}}).
55+
You can see more configuration details in
56+
[setting up your own grid]({{< ref "getting_started.md" >}}).
5657

5758
A Node only executes the received commands, it does not evaluate, make judgments,
5859
or control anything. The machines where the Node is running does not need to have
@@ -96,6 +97,6 @@ When starting the Grid in its fully distributed mode, the Event Bus is the first
9697

9798
{{% alert title="Running your own Grid" color="primary" %}}
9899
Looking forward to using all these components and run your own Grid?
99-
Head to the ["Setting up your own"]({{< ref "setting_up_your_own_grid.md" >}})
100+
Head to the ["Getting Started"]({{< ref "getting_started.md" >}})
100101
section to understand how to put all these pieces together.
101102
{{% /alert %}}

website_and_docs/content/documentation/grid/components.ja.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ By default, the Node auto-registers all browser drivers available on the path of
5757
the machine where it runs. It also creates one slot per available CPU for Chromium
5858
based browsers and Firefox. For Safari and Internet Explorer, only one slot is created.
5959
Through a specific configuration, it can run sessions in Docker containers or relay commands.
60-
You can see more configuration details in the next [section]({{< ref "setting_up_your_own_grid.md" >}}).
60+
You can see more configuration details in
61+
[setting up your own grid]({{< ref "getting_started.md" >}}).
6162

6263
ノードは受信したコマンドを実行するだけで、評価、判断、制御は行いません。
6364
ノードが実行されているマシンは、他のコンポーネントと同じオペレーティングシステムを持つ必要はありません。
@@ -99,6 +100,6 @@ When starting the Grid in its fully distributed mode, the Event Bus is the first
99100

100101
{{% alert title="Running your own Grid" color="primary" %}}
101102
Looking forward to using all these components and run your own Grid?
102-
Head to the ["Setting up your own"]({{< ref "setting_up_your_own_grid.md" >}})
103+
Head to the ["Getting Started"]({{< ref "getting_started.md" >}})
103104
section to understand how to put all these pieces together.
104105
{{% /alert %}}

website_and_docs/content/documentation/grid/components.pt-br.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ By default, the Node auto-registers all browser drivers available on the path of
5959
the machine where it runs. It also creates one slot per available CPU for Chromium
6060
based browsers and Firefox. For Safari and Internet Explorer, only one slot is created.
6161
Through a specific configuration, it can run sessions in Docker containers or relay commands.
62-
You can see more configuration details in the next [section]({{< ref "setting_up_your_own_grid.md" >}}).
62+
You can see more configuration details in
63+
[setting up your own grid]({{< ref "getting_started.md" >}}).
6364

6465
Um Nó apenas executa os comandos recebidos, não avalia, não faz julgamentos,
6566
ou controlar qualquer coisa. As máquinas onde o Nó está rodando não precisam ter
@@ -102,6 +103,6 @@ When starting the Grid in its fully distributed mode, the Event Bus is the first
102103

103104
{{% alert title="Running your own Grid" color="primary" %}}
104105
Looking forward to using all these components and run your own Grid?
105-
Head to the ["Setting up your own"]({{< ref "setting_up_your_own_grid.md" >}})
106+
Head to the ["Getting Started"]({{< ref "getting_started.md" >}})
106107
section to understand how to put all these pieces together.
107108
{{% /alert %}}

website_and_docs/content/documentation/grid/components.zh-cn.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ aliases: [
6060
只创建一个插槽.
6161
通过特定的配置,
6262
它可以在Docker容器或中继命令中运行会话.
63-
您可以在下一 [章节]({{< ref "setting_up_your_own_grid.md" >}})
63+
您可以在下一 [章节]({{< ref "getting_started.md" >}})
6464
中看到更多配置详细信息.
6565

6666
节点仅执行接收到的命令,
@@ -110,6 +110,6 @@ aliases: [
110110

111111
{{% alert title="运行你自己的Grid" color="primary" %}}
112112
期待使用所有组件并运行自己的Grid?
113-
前往 ["配置自己的服务网格"]({{< ref "setting_up_your_own_grid.md" >}}) ,
113+
前往 ["配置自己的服务网格"]({{< ref "getting_started.md" >}}) ,
114114
了解如何将所有零件组合在一起.
115115
{{% /alert %}}

website_and_docs/content/documentation/grid/getting_started.en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ aliases: [
1212

1313
## Grid roles
1414

15-
Several [components]({{< ref "components_of_a_grid.md" >}}) compose a Selenium Grid. Depending
15+
Several [components]({{< ref "components.md" >}}) compose a Selenium Grid. Depending
1616
on your needs, you can start each one of them on its own, or a few at the same time by using a
1717
Grid role.
1818

website_and_docs/content/documentation/grid/getting_started.ja.md

+2-10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: "独自のグリッドを設定する"
33
linkTitle: "独自のグリッドを設定する"
44
weight: 2
5+
needsTranslation: true
56
description: >
67
Instructions, step by step, showing how to run a simple Selenium Grid.
78
aliases: [
@@ -10,18 +11,9 @@ aliases: [
1011
]
1112
---
1213

13-
{{% pageinfo color="warning" %}}
14-
<p class="lead">
15-
<i class="fas fa-language display-4"></i>
16-
Page being translated from
17-
English to Japanese. Do you speak Japanese? Help us to translate
18-
it by sending us pull requests!
19-
</p>
20-
{{% /pageinfo %}}
21-
2214
## Grid roles
2315

24-
Several [components]({{< ref "components_of_a_grid.md" >}}) compose a Selenium Grid. Depending
16+
Several [components]({{< ref "components.md" >}}) compose a Selenium Grid. Depending
2517
on your needs, you can start each one of them on its own, or a few at the same time by using a
2618
Grid role.
2719

website_and_docs/content/documentation/grid/getting_started.pt-br.md

+2-10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: "Configurando a sua"
33
linkTitle: "Configurando a sua"
44
weight: 2
5+
needsTranslation: true
56
description: >
67
Instructions, step by step, showing how to run a simple Selenium Grid.
78
aliases: [
@@ -10,18 +11,9 @@ aliases: [
1011
]
1112
---
1213

13-
{{% pageinfo color="warning" %}}
14-
<p class="lead">
15-
<i class="fas fa-language display-4"></i>
16-
Page being translated from
17-
English to Portuguese. Do you speak Portuguese? Help us to translate
18-
it by sending us pull requests!
19-
</p>
20-
{{% /pageinfo %}}
21-
2214
## Grid roles
2315

24-
Several [components]({{< ref "components_of_a_grid.md" >}}) compose a Selenium Grid. Depending
16+
Several [components]({{< ref "components.md" >}}) compose a Selenium Grid. Depending
2517
on your needs, you can start each one of them on its own, or a few at the same time by using a
2618
Grid role.
2719

website_and_docs/content/documentation/grid/getting_started.zh-cn.md

+2-10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: "Selenium Grid快速起步"
33
linkTitle: "快速起步"
44
weight: 2
5+
needsTranslation: true
56
description: >
67
一步一步地说明如何运行简单的Selenium Grid.
78
aliases: [
@@ -10,18 +11,9 @@ aliases: [
1011
]
1112
---
1213

13-
{{% pageinfo color="warning" %}}
14-
<p class="lead">
15-
<i class="fas fa-language display-4"></i>
16-
Page being translated from
17-
English to Chinese. Do you speak Chinese? Help us to translate
18-
it by sending us pull requests!
19-
</p>
20-
{{% /pageinfo %}}
21-
2214
## Grid roles
2315

24-
Several [components]({{< ref "components_of_a_grid.md" >}}) compose a Selenium Grid. Depending
16+
Several [components]({{< ref "components.md" >}}) compose a Selenium Grid. Depending
2517
on your needs, you can start each one of them on its own, or a few at the same time by using a
2618
Grid role.
2719

website_and_docs/content/documentation/ie_driver_server.pt-br.md renamed to website_and_docs/content/documentation/ie_driver_server/_index.en.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ weight: 8
55
description: >
66
The Internet Explorer Driver is a standalone server that implements the WebDriver specification.
77
---
8+
This documentation previously located [on the wiki](https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver-Internals) \
89

910
The `InternetExplorerDriver` is a standalone server which implements WebDriver's wire protocol.
1011
This driver has been tested with IE 11, and on Windows 10. It might work with older versions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: "Internet Explorer Driver Internals"
3+
linkTitle: "Internals"
4+
weight: 2
5+
description: >
6+
More detailed information on the IE Driver.
7+
---
8+
9+
## Client Code Into the Driver
10+
11+
We use the W3C WebDriver protocol to communicate with a local instance of an HTTP server. This greatly simplifies the implementation of the language-specific code, and minimzes the number of entry points into the C++ DLL that must be called using a native-code interop technology such as [JNA](https://jna.dev.java.net/), [ctypes](http://docs.python.org/library/ctypes.html), [pinvoke](http://msdn.microsoft.com/en-us/library/aa446536.aspx) or [DL](http://www.ruby-doc.org/stdlib/libdoc/dl/rdoc/index.html).
12+
13+
### Memory Management
14+
15+
The IE driver utilizes the Active Template Library (ATL) to take advantage of its implementation of smart pointers to COM objects. This makes reference counting and cleanup of COM objects much easier.
16+
17+
## Why Do We Require Protected Mode Settings Changes?
18+
19+
IE 7 on Windows Vista introduced the concept of Protected Mode, which allows for some measure of protection to the underlying Windows OS when browsing. The problem is that when you manipulate an instance of IE via COM, and you navigate to a page that would cause a transition into or out of Protected Mode, IE requires that another browser session be created. This will orphan the COM object of the previous session, not allowing you to control it any longer.
20+
21+
In IE 7, this will usually manifest itself as a new top-level browser window; in IE 8, a new IExplore.exe process will be created, but it will usually (not always!) seamlessly attach it to the existing IE top-level frame window. Any browser automation framework that drives IE externally (as opposed to using a WebBrowser control) will run into these problems.
22+
23+
In order to work around that problem, we dictate that to work with IE, all zones must have the same Protected Mode setting. As long as it's on for all zones, or off for all zones, we can prevent the transistions to different Protected Mode zones that would invalidate our browser object. It also allows users to continue to run with UAC turned on, and to run securely in the browser if they set Protected Mode "on" for all zones.
24+
25+
In earlier releases of the IE driver, if the user's Protected Mode settings were not correctly set, we would launch IE, and the process would simply hang until the HTTP request timed out. This was suboptimal, as it gave no indication what needed to be set. Erring on the side of caution, we do not modify the user's Protected Mode settings. Current versions, however check that the Protected Mode settings are properly set, and will return an error response if they are not.
26+
27+
## Keyboard and Mouse Input
28+
29+
Key files: [interactions.cpp](https://github.com/SeleniumHQ/selenium/blob/master/cpp/webdriver-interactions/interactions.cpp)
30+
31+
There are two ways that we could simulate keyboard and mouse input. The first way, which is used in parts of webdriver, is to synthesize events on the DOM. This has a number of drawbacks, since each browser (and version of a browser) has its own unique quirks; to model each of these is a demanding task, and impossible to get completely right (for example, it's hard to tell what `window.selection` should be and this is a read-only property on some browsers) The alternative approach is to synthesize keyboard and mouse input at the OS level, ideally without stealing focus from the user (who tends to be doing other things on their computer as long-running webdriver tests run)
32+
33+
The code for doing this is in [interactions.cpp](https://github.com/SeleniumHQ/selenium/blob/master/cpp/webdriver-interactions/interactions.cpp) The key thing to note here is that we use PostMessages to push window events on to the message queue of the IE instance. Typing, in particular, is interesting: we only send the "keydown" and "keyup" messages. The "keypress" event is created if necessary by IE's internal event processing. Because the key press event is not always generated (for example, not every character is printable, and if the default event bubbling is cancelled, listeners don't see the key press event) we send a "probe" event in after the key down. Once we see that this has been processed, we know that the key press event is on the stack of events to be processed, and that it is safe to send the key up event. If this was not done, it is possible for events to fire in the wrong order, which is definitely sub-optimal.
34+
35+
# Working On the InternetExplorerDriver
36+
37+
Currently, there are tests that will run for the InternetExplorerDriver in all languages (Java, C#, Python, and Ruby), so you should be able to test your changes to the native code no matter what language you're comfortable working in from the client side. For working on the C++ code, you'll need Visual Studio 2010 Professional or higher. Unfortunately, the C++ code of the driver uses ATL to ease the pain of working with COM objects, and ATL is not supplied with Visual C++ 2010 Express Edition. If you're using Eclipse, the process for making and testing modifications is:
38+
39+
1. Edit the C++ code in VS.
40+
1. Build the code to ensure that it compiles
41+
1. Do a complete rebuild when you are ready to run a test. This will cause the created DLL to be copied to the right place to allow its use in Eclipse
42+
1. Load Eclipse (or some other IDE, such as Idea)
43+
1. Edit the `SingleTestSuite` so that it is `usingDriver(IE)`
44+
1. Create a JUnit run configuration that uses the "webdriver-internet-explorer" project. If you don't do this, the test won't work at all, and there will be a somewhat cryptic error message on the console.
45+
46+
Once the basic setup is done, you can start working on the code pretty quickly. You can attach to the process you execute your code from using Visual Studio (from the Debug menu, select Attach to Process...).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: "Internet Explorer Driver Internals"
3+
linkTitle: "Internals"
4+
weight: 2
5+
needsTranslation: true
6+
description: >
7+
More detailed information on the IE Driver.
8+
---
9+
10+
## Client Code Into the Driver
11+
12+
We use the W3C WebDriver protocol to communicate with a local instance of an HTTP server. This greatly simplifies the implementation of the language-specific code, and minimzes the number of entry points into the C++ DLL that must be called using a native-code interop technology such as [JNA](https://jna.dev.java.net/), [ctypes](http://docs.python.org/library/ctypes.html), [pinvoke](http://msdn.microsoft.com/en-us/library/aa446536.aspx) or [DL](http://www.ruby-doc.org/stdlib/libdoc/dl/rdoc/index.html).
13+
14+
### Memory Management
15+
16+
The IE driver utilizes the Active Template Library (ATL) to take advantage of its implementation of smart pointers to COM objects. This makes reference counting and cleanup of COM objects much easier.
17+
18+
## Why Do We Require Protected Mode Settings Changes?
19+
20+
IE 7 on Windows Vista introduced the concept of Protected Mode, which allows for some measure of protection to the underlying Windows OS when browsing. The problem is that when you manipulate an instance of IE via COM, and you navigate to a page that would cause a transition into or out of Protected Mode, IE requires that another browser session be created. This will orphan the COM object of the previous session, not allowing you to control it any longer.
21+
22+
In IE 7, this will usually manifest itself as a new top-level browser window; in IE 8, a new IExplore.exe process will be created, but it will usually (not always!) seamlessly attach it to the existing IE top-level frame window. Any browser automation framework that drives IE externally (as opposed to using a WebBrowser control) will run into these problems.
23+
24+
In order to work around that problem, we dictate that to work with IE, all zones must have the same Protected Mode setting. As long as it's on for all zones, or off for all zones, we can prevent the transistions to different Protected Mode zones that would invalidate our browser object. It also allows users to continue to run with UAC turned on, and to run securely in the browser if they set Protected Mode "on" for all zones.
25+
26+
In earlier releases of the IE driver, if the user's Protected Mode settings were not correctly set, we would launch IE, and the process would simply hang until the HTTP request timed out. This was suboptimal, as it gave no indication what needed to be set. Erring on the side of caution, we do not modify the user's Protected Mode settings. Current versions, however check that the Protected Mode settings are properly set, and will return an error response if they are not.
27+
28+
## Keyboard and Mouse Input
29+
30+
Key files: [interactions.cpp](https://github.com/SeleniumHQ/selenium/blob/master/cpp/webdriver-interactions/interactions.cpp)
31+
32+
There are two ways that we could simulate keyboard and mouse input. The first way, which is used in parts of webdriver, is to synthesize events on the DOM. This has a number of drawbacks, since each browser (and version of a browser) has its own unique quirks; to model each of these is a demanding task, and impossible to get completely right (for example, it's hard to tell what `window.selection` should be and this is a read-only property on some browsers) The alternative approach is to synthesize keyboard and mouse input at the OS level, ideally without stealing focus from the user (who tends to be doing other things on their computer as long-running webdriver tests run)
33+
34+
The code for doing this is in [interactions.cpp](https://github.com/SeleniumHQ/selenium/blob/master/cpp/webdriver-interactions/interactions.cpp) The key thing to note here is that we use PostMessages to push window events on to the message queue of the IE instance. Typing, in particular, is interesting: we only send the "keydown" and "keyup" messages. The "keypress" event is created if necessary by IE's internal event processing. Because the key press event is not always generated (for example, not every character is printable, and if the default event bubbling is cancelled, listeners don't see the key press event) we send a "probe" event in after the key down. Once we see that this has been processed, we know that the key press event is on the stack of events to be processed, and that it is safe to send the key up event. If this was not done, it is possible for events to fire in the wrong order, which is definitely sub-optimal.
35+
36+
# Working On the InternetExplorerDriver
37+
38+
Currently, there are tests that will run for the InternetExplorerDriver in all languages (Java, C#, Python, and Ruby), so you should be able to test your changes to the native code no matter what language you're comfortable working in from the client side. For working on the C++ code, you'll need Visual Studio 2010 Professional or higher. Unfortunately, the C++ code of the driver uses ATL to ease the pain of working with COM objects, and ATL is not supplied with Visual C++ 2010 Express Edition. If you're using Eclipse, the process for making and testing modifications is:
39+
40+
1. Edit the C++ code in VS.
41+
1. Build the code to ensure that it compiles
42+
1. Do a complete rebuild when you are ready to run a test. This will cause the created DLL to be copied to the right place to allow its use in Eclipse
43+
1. Load Eclipse (or some other IDE, such as Idea)
44+
1. Edit the `SingleTestSuite` so that it is `usingDriver(IE)`
45+
1. Create a JUnit run configuration that uses the "webdriver-internet-explorer" project. If you don't do this, the test won't work at all, and there will be a somewhat cryptic error message on the console.
46+
47+
Once the basic setup is done, you can start working on the code pretty quickly. You can attach to the process you execute your code from using Visual Studio (from the Debug menu, select Attach to Process...).

0 commit comments

Comments
 (0)