Skip to content

Modify: Translating Webdriver -> support classes doc to french #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Feb 20, 2020
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
41e5d3e
Modify: Removed unneccessary awaits for find element
harsha509 Dec 16, 2019
5051195
Add: Added ruby sample code for mouse actionsin support package
harsha509 Dec 17, 2019
b4bdbc5
Merge branch 'master' of https://github.com/Harsha509/seleniumhq.gith…
harsha509 Dec 17, 2019
4123fa2
Modify: Revamping the WebElement usage document
harsha509 Dec 24, 2019
381083d
Add: Adding findElements section to web_element document
harsha509 Dec 24, 2019
0c005f5
Merge branch 'master' into master
manoj9788 Dec 26, 2019
21aabec
Merge branch 'master' of https://github.com/Harsha509/seleniumhq.gith…
harsha509 Dec 26, 2019
f8dec4b
Merge remote-tracking branch 'upstream/master'
harsha509 Dec 26, 2019
df1dbd8
Modify: Update to stale PR #111
harsha509 Dec 26, 2019
a65dfa0
Modify: Removed desired capabilities and used FirefoxOptions in code …
harsha509 Dec 26, 2019
51c4a55
Modify: Translated[EN-FR] Introduction-> selenium_proj_and_tools
harsha509 Jan 25, 2020
2512edb
Merge remote-tracking branch 'upstream/master'
harsha509 Jan 26, 2020
22b861d
Modify: Translated[EN-FR] introduction-> types of testing
harsha509 Jan 26, 2020
9548e2d
Fix: Updating text to bold
harsha509 Jan 26, 2020
2856535
Merge remote-tracking branch 'upstream/master'
harsha509 Jan 28, 2020
a449771
Merge remote-tracking branch 'upstream/master'
harsha509 Jan 29, 2020
9e90063
Merge remote-tracking branch 'upstream/master'
harsha509 Feb 2, 2020
159a299
Merge remote-tracking branch 'upstream/master'
harsha509 Feb 3, 2020
37cb2c1
Merge remote-tracking branch 'upstream/master'
harsha509 Feb 5, 2020
711f344
Merge remote-tracking branch 'upstream/master'
harsha509 Feb 8, 2020
90dcc40
Merge branch 'master' of https://github.com/Harsha509/seleniumhq.gith…
harsha509 Feb 8, 2020
2d2c97d
Merge remote-tracking branch 'upstream/master'
harsha509 Feb 9, 2020
fe2579d
Merge remote-tracking branch 'upstream/master'
harsha509 Feb 10, 2020
2db7524
Merge branch 'master' of https://github.com/Harsha509/seleniumhq.gith…
harsha509 Feb 19, 2020
b75aba4
Merge remote-tracking branch 'upstream/master'
harsha509 Feb 19, 2020
4d5482e
Merge remote-tracking branch 'upstream/master'
harsha509 Feb 20, 2020
e017af8
Modify: [EN]->[FR]: Translating webdriver-> support classes
harsha509 Feb 20, 2020
8978330
Merge branch 'master' into webdriver_support_classes
diemol Feb 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 24 additions & 28 deletions docs_source_files/content/webdriver/support_classes.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,32 @@ title: "Classes de support"
weight: 5
---

{{% notice info %}}
<i class="fas fa-language"></i> Page being translated from
English to French. Do you speak French? Help us to translate
it by sending us pull requests!
{{% /notice %}}

WebDriver support classes are provided to simplify maintaining your code.
They provide a nice abstraction to make modeling HTML element(s) as domain
objects easier, also providing helper methods to make using such objects easy to
reason about. We will learn about:

* Locator Strategies
* Events
Les classes de support WebDriver sont fournies pour simplifier
la maintenance de votre code.Elles fournissent une belle
abstraction pour faciliter la modélisation des éléments HTML en
tant qu'objets de domaine, ainsi que des méthodes d'aide pour rendre
l'utilisation de ces objets facile à raisonner.

* Stratégies de localisation
* Événements
* LoadableComponent
* ThreadGuard
* etc.

Let's Start:

Commençons:


## **ThreadGuard**
{{% notice info %}}
This class is only available in the Java Binding
Cette classe est uniquement disponible dans la liaison Java
{{% /notice %}}
ThreadGuard checks that a driver is called only from the same thread that created it.
Threading issues especially when running tests in Parallel may have mysterious
and hard to diagnose errors. Using this wrapper prevents this category of errors
and will raise an exception when it happens.
ThreadGuard vérifie qu'un pilote est appelé uniquement à partir du même thread qui l'a créé.
Les problèmes de thread, en particulier lors de l'exécution de tests en parallèle, peuvent être mystérieux
et difficile à diagnostiquer les erreurs. L'utilisation de ce wrapper empêche cette catégorie d'erreurs
et lèvera une exception lorsque cela se produira.

The following example simulate a clash of threads:
L'exemple suivant simule un choc de threads:

```java
public class DriverClash {
Expand All @@ -57,22 +53,22 @@ public class DriverClash {
}
```

The result shown below:
Le résultat ci-dessous:
```text
Exception in thread "Thread-1" org.openqa.selenium.WebDriverException:
Thread safety error; this instance of WebDriver was constructed
on thread main (id 1)and is being accessed by thread Thread-1 (id 24)
This is not permitted and *will* cause undefined behaviour

```
As seen in the example:
Comme le montre l'exemple:

* `protectedDriver` Will be created in Main thread
* We use Java `Runnable` to spin up a new process and a new `Thread` to run the process
* Both `Thread` will clash because the Main Thread does not have `protectedDriver` in it's memory.
* `ThreadGuard.protect` will throw an exception.
* `protectedDriver` sera créé dans le thread principal
* Nous utilisons Java `Runnable` pour lancer un nouveau processus et un nouveau `Thread` pour exécuter le processus
* Les deux `Thread` s'affrontent car le Thread principal n'a pas` protectedDriver` dans sa mémoire.
* `ThreadGuard.protect` lèvera une exception.

#### Note:
#### Remarque:

This does not replace the need for using `ThreadLocal` to manage drivers when running parallel.
Cela ne remplace pas la nécessité d'utiliser `ThreadLocal` pour gérer les pilotes lors de l'exécution en parallèle.