Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 47f5fc8

Browse files
harsha509diemol
authored andcommitted
Modify: Updating code sample to match other examples in this section (SeleniumHQ#124) [deploy site]
Signed-off-by: Sri Harsha <[email protected]>
1 parent 3996455 commit 47f5fc8

File tree

8 files changed

+16
-8
lines changed

8 files changed

+16
-8
lines changed

docs_source_files/content/webdriver/waits.de.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ assert el.text == "Hello from JavaScript!"
250250
# We don't have a Ruby code sample yet - Help us out and raise a PR
251251
{{< / code-panel >}}
252252
{{< code-panel language="javascript" >}}
253-
let foo = await driver.findElement(By.name("q")).getText();
253+
let ele = await driver.wait(until.elementLocated(By.css('p')),10000);
254+
let foo = await ele.getText();
254255
assert(foo == "Hello from JavaScript");
255256
{{< / code-panel >}}
256257
{{< code-panel language="kotlin" >}}

docs_source_files/content/webdriver/waits.en.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ assert el.text == "Hello from JavaScript!"
245245
# We don't have a Ruby code sample yet - Help us out and raise a PR
246246
{{< / code-panel >}}
247247
{{< code-panel language="javascript" >}}
248-
let foo = await driver.findElement(By.name("q")).getText();
248+
let ele = await driver.wait(until.elementLocated(By.css('p')),10000);
249+
let foo = await ele.getText();
249250
assert(foo == "Hello from JavaScript");
250251
{{< / code-panel >}}
251252
{{< code-panel language="kotlin" >}}

docs_source_files/content/webdriver/waits.es.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ assert el.text == "Hello from JavaScript!"
250250
# We don't have a Ruby code sample yet - Help us out and raise a PR
251251
{{< / code-panel >}}
252252
{{< code-panel language="javascript" >}}
253-
let foo = await driver.findElement(By.name("q")).getText();
253+
let ele = await driver.wait(until.elementLocated(By.css('p')),10000);
254+
let foo = await ele.getText();
254255
assert(foo == "Hello from JavaScript");
255256
{{< / code-panel >}}
256257
{{< code-panel language="kotlin" >}}

docs_source_files/content/webdriver/waits.fr.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ assert el.text == "Hello from JavaScript!"
251251
# We don't have a Ruby code sample yet - Help us out and raise a PR
252252
{{< / code-panel >}}
253253
{{< code-panel language="javascript" >}}
254-
let foo = await driver.findElement(By.name("q")).getText();
254+
let ele = await driver.wait(until.elementLocated(By.css('p')),10000);
255+
let foo = await ele.getText();
255256
assert(foo == "Hello from JavaScript");
256257
{{< / code-panel >}}
257258
{{< code-panel language="kotlin" >}}

docs_source_files/content/webdriver/waits.ja.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ using (var driver = new FirefoxDriver())
250250
# We don't have a Ruby code sample yet - Help us out and raise a PR
251251
{{< / code-panel >}}
252252
{{< code-panel language="javascript" >}}
253-
let foo = await driver.findElement(By.name("q")).getText();
253+
let ele = await driver.wait(until.elementLocated(By.css('p')),10000);
254+
let foo = await ele.getText();
254255
assert(foo == "Hello from JavaScript");
255256
{{< / code-panel >}}
256257
{{< code-panel language="kotlin" >}}

docs_source_files/content/webdriver/waits.ko.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ assert el.text == "Hello from JavaScript!"
251251
# We don't have a Ruby code sample yet - Help us out and raise a PR
252252
{{< / code-panel >}}
253253
{{< code-panel language="javascript" >}}
254-
let foo = await driver.findElement(By.name("q")).getText();
254+
let ele = await driver.wait(until.elementLocated(By.css('p')),10000);
255+
let foo = await ele.getText();
255256
assert(foo == "Hello from JavaScript");
256257
{{< / code-panel >}}
257258
{{< code-panel language="kotlin" >}}

docs_source_files/content/webdriver/waits.nl.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ assert el.text == "Hello from JavaScript!"
250250
# We don't have a Ruby code sample yet - Help us out and raise a PR
251251
{{< / code-panel >}}
252252
{{< code-panel language="javascript" >}}
253-
let foo = await driver.findElement(By.name("q")).getText();
253+
let ele = await driver.wait(until.elementLocated(By.css('p')),10000);
254+
let foo = await ele.getText();
254255
assert(foo == "Hello from JavaScript");
255256
{{< / code-panel >}}
256257
{{< code-panel language="kotlin" >}}

docs_source_files/content/webdriver/waits.zh-cn.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ using (var driver = new FirefoxDriver())
250250
# We don't have a Ruby code sample yet - Help us out and raise a PR
251251
{{< / code-panel >}}
252252
{{< code-panel language="javascript" >}}
253-
let foo = await driver.findElement(By.name("q")).getText();
253+
let ele = await driver.wait(until.elementLocated(By.css('p')),10000);
254+
let foo = await ele.getText();
254255
assert(foo == "Hello from JavaScript");
255256
{{< / code-panel >}}
256257
{{< code-panel language="kotlin" >}}

0 commit comments

Comments
 (0)