Skip to content

Commit

Permalink
Consider Using a Fluent API - Fix usage (#1378)
Browse files Browse the repository at this point in the history
* Update consider_using_a_fluent_api.en.md

Fix usage code to match new GoogleSearchPage implementation.

* Update all relevant pages - JA, PT-BR, ZH-CN

[deploy site]
---------

Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
  • Loading branch information
kathyrollo and diemol committed May 17, 2023
1 parent 1722cc5 commit 332da70
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ and then query the Google search page with a code snippet like this one:

```java
driver.get( "http://www.google.com/webhp?hl=en&amp;tab=ww" );
GoogleSearchPage gsp = new GoogleSearchPage();
gsp.withFluent().setSearchString().clickSearchButton();
GoogleSearchPage gsp = new GoogleSearchPage(driver);
gsp.setSearchString().clickSearchButton();
```

The Google page object class with this fluent behavior
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Seleniumは既に、`FluentWait`クラスでこのようなものを実装して

```java
driver.get( "http://www.google.com/webhp?hl=en&amp;tab=ww" );
GoogleSearchPage gsp = new GoogleSearchPage();
gsp.withFluent().setSearchString().clickSearchButton();
GoogleSearchPage gsp = new GoogleSearchPage(driver);
gsp.setSearchString().clickSearchButton();
```

この流暢な動作を持つGoogleページオブジェクトクラスは次のようになります。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ e, em seguida, consulte a página de pesquisa do Google com um snippet de códig

```java
driver.get( "http://www.google.com/webhp?hl=en&amp;tab=ww" );
GoogleSearchPage gsp = new GoogleSearchPage();
gsp.withFluent().setSearchString().clickSearchButton();
GoogleSearchPage gsp = new GoogleSearchPage(driver);
gsp.setSearchString().clickSearchButton();
```

A classe de objeto da página do Google com este comportamento fluente
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Selenium已经在其 `FluentWait` 类中实现了类似的东西, 这是对标

```java
driver.get( "http://www.google.com/webhp?hl=en&amp;tab=ww" );
GoogleSearchPage gsp = new GoogleSearchPage();
gsp.withFluent().setSearchString().clickSearchButton();
GoogleSearchPage gsp = new GoogleSearchPage(driver);
gsp.setSearchString().clickSearchButton();
```

Google页面对象类具有这种流畅行为后可能看起来像这样:
Expand Down

0 comments on commit 332da70

Please sign in to comment.