Skip to content

Commit aee4bac

Browse files
harsha509diemol
authored andcommitted
Updated ruby sample code for browser manipulation (#366)
Signed-off-by: Sri Harsha <sri_harsha509@hotmail.com>
1 parent 44d1cfc commit aee4bac

6 files changed

+42
-12
lines changed

docs_source_files/content/webdriver/browser_manipulation.en.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ driver.get("https://www.seleniumhq.org")
8080
driver.Navigate().GoToUrl(@"http://google.com");
8181
{{< / code-panel >}}
8282
{{< code-panel language="ruby" >}}
83-
# We don't have a Ruby code sample yet - Help us out and raise a PR
83+
# Convenient way
84+
driver.get 'https://www.seleniumhq.org'
85+
86+
# Longer Way
87+
driver.navigate.to 'https://www.seleniumhq.org'
8488
{{< / code-panel >}}
8589
{{< code-panel language="javascript" >}}
8690
await driver.get('https://seleniumhq.github.io/docs/');
@@ -517,7 +521,8 @@ driver.findElement(By.tagName("button")).click();
517521
driver.FindElement(By.TagName("button")).Click();
518522
{{< / code-panel >}}
519523
{{< code-panel language="ruby" >}}
520-
# We don't have a Ruby code sample yet - Help us out and raise a PR
524+
# This won't work
525+
driver.find_element(:tag_name,'button').click
521526
{{< / code-panel >}}
522527
{{< code-panel language="javascript" >}}
523528
// This won't work

docs_source_files/content/webdriver/browser_manipulation.es.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ driver.get("https://www.seleniumhq.org")
8686
driver.Navigate().GoToUrl(@"http://google.com");
8787
{{< / code-panel >}}
8888
{{< code-panel language="ruby" >}}
89-
# We don't have a Ruby code sample yet - Help us out and raise a PR
89+
# Convenient way
90+
driver.get 'https://www.seleniumhq.org'
91+
92+
# Longer Way
93+
driver.navigate.to 'https://www.seleniumhq.org'
9094
{{< / code-panel >}}
9195
{{< code-panel language="javascript" >}}
9296
await driver.get('https://seleniumhq.github.io/docs/');
@@ -523,7 +527,8 @@ driver.findElement(By.tagName("button")).click();
523527
driver.FindElement(By.TagName("button")).Click();
524528
{{< / code-panel >}}
525529
{{< code-panel language="ruby" >}}
526-
# We don't have a Ruby code sample yet - Help us out and raise a PR
530+
# This won't work
531+
driver.find_element(:tag_name,'button').click
527532
{{< / code-panel >}}
528533
{{< code-panel language="javascript" >}}
529534
// This won't work

docs_source_files/content/webdriver/browser_manipulation.fr.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ driver.get("https://www.seleniumhq.org")
8686
driver.Navigate().GoToUrl(@"http://google.com");
8787
{{< / code-panel >}}
8888
{{< code-panel language="ruby" >}}
89-
# We don't have a Ruby code sample yet - Help us out and raise a PR
89+
# Convenient way
90+
driver.get 'https://www.seleniumhq.org'
91+
92+
# Longer Way
93+
driver.navigate.to 'https://www.seleniumhq.org'
9094
{{< / code-panel >}}
9195
{{< code-panel language="javascript" >}}
9296
await driver.get('https://seleniumhq.github.io/docs/');
@@ -523,7 +527,8 @@ driver.findElement(By.tagName("button")).click();
523527
driver.FindElement(By.TagName("button")).Click();
524528
{{< / code-panel >}}
525529
{{< code-panel language="ruby" >}}
526-
# We don't have a Ruby code sample yet - Help us out and raise a PR
530+
# This won't work
531+
driver.find_element(:tag_name,'button').click
527532
{{< / code-panel >}}
528533
{{< code-panel language="javascript" >}}
529534
// This won't work

docs_source_files/content/webdriver/browser_manipulation.ja.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ driver.get("https://www.seleniumhq.org")
8484
driver.Navigate().GoToUrl(@"http://google.com");
8585
{{< / code-panel >}}
8686
{{< code-panel language="ruby" >}}
87-
# We don't have a Ruby code sample yet - Help us out and raise a PR
87+
# Convenient way
88+
driver.get 'https://www.seleniumhq.org'
89+
90+
# Longer Way
91+
driver.navigate.to 'https://www.seleniumhq.org'
8892
{{< / code-panel >}}
8993
{{< code-panel language="javascript" >}}
9094
await driver.get('https://seleniumhq.github.io/docs/');
@@ -521,7 +525,8 @@ driver.findElement(By.tagName("button")).click();
521525
driver.FindElement(By.TagName("button")).Click();
522526
{{< / code-panel >}}
523527
{{< code-panel language="ruby" >}}
524-
# We don't have a Ruby code sample yet - Help us out and raise a PR
528+
# This won't work
529+
driver.find_element(:tag_name,'button').click
525530
{{< / code-panel >}}
526531
{{< code-panel language="javascript" >}}
527532
// This won't work

docs_source_files/content/webdriver/browser_manipulation.nl.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ driver.get("https://www.seleniumhq.org")
8686
driver.Navigate().GoToUrl(@"http://google.com");
8787
{{< / code-panel >}}
8888
{{< code-panel language="ruby" >}}
89-
# We don't have a Ruby code sample yet - Help us out and raise a PR
89+
# Convenient way
90+
driver.get 'https://www.seleniumhq.org'
91+
92+
# Longer Way
93+
driver.navigate.to 'https://www.seleniumhq.org'
9094
{{< / code-panel >}}
9195
{{< code-panel language="javascript" >}}
9296
await driver.get('https://seleniumhq.github.io/docs/');
@@ -523,7 +527,8 @@ driver.findElement(By.tagName("button")).click();
523527
driver.FindElement(By.TagName("button")).Click();
524528
{{< / code-panel >}}
525529
{{< code-panel language="ruby" >}}
526-
# We don't have a Ruby code sample yet - Help us out and raise a PR
530+
# This won't work
531+
driver.find_element(:tag_name,'button').click
527532
{{< / code-panel >}}
528533
{{< code-panel language="javascript" >}}
529534
// This won't work

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ driver.get("https://www.seleniumhq.org")
8585
driver.Navigate().GoToUrl(@"http://google.com");
8686
{{< / code-panel >}}
8787
{{< code-panel language="ruby" >}}
88-
# We don't have a Ruby code sample yet - Help us out and raise a PR
88+
# Convenient way
89+
driver.get 'https://www.seleniumhq.org'
90+
91+
# Longer Way
92+
driver.navigate.to 'https://www.seleniumhq.org'
8993
{{< / code-panel >}}
9094
{{< code-panel language="javascript" >}}
9195
await driver.get('https://seleniumhq.github.io/docs/');
@@ -522,7 +526,8 @@ driver.findElement(By.tagName("button")).click();
522526
driver.FindElement(By.TagName("button")).Click();
523527
{{< / code-panel >}}
524528
{{< code-panel language="ruby" >}}
525-
# We don't have a Ruby code sample yet - Help us out and raise a PR
529+
# This won't work
530+
driver.find_element(:tag_name,'button').click
526531
{{< / code-panel >}}
527532
{{< code-panel language="javascript" >}}
528533
// This won't work

0 commit comments

Comments
 (0)