Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 76d80d0

Browse files
aguspeharsha509
andauthored
Upgrade selenium 4 ruby examples & rendering issue (#1695)[deploy site]
* Expand options documentation test and examples * Update timeouts examples * Update all navigations * Update options after updating the tests * Update options after updating the tests * Fix documentation bug * Fix documentation issue and migrate ruby code * Fix proxy documentation issue --------- Co-authored-by: aguspe <agustin.pe94@gmail.com> Co-authored-by: Sri Harsha <12621691+harsha509@users.noreply.github.com>
1 parent d9b0488 commit 76d80d0

File tree

9 files changed

+253
-155
lines changed

9 files changed

+253
-155
lines changed

‎examples/ruby/spec/drivers/options_spec.rb‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,16 @@
118118
driver.get(url)
119119
driver.quit
120120
end
121+
122+
it 'sets capabilities in the pre-selenium 4 way', skip: 'this is example code that will not execute' do
123+
caps = Selenium::WebDriver::Remote::Capabilities.firefox
124+
caps[:platform] = 'Windows 10'
125+
caps[:version] = '92'
126+
caps[:build] = my_test_build
127+
caps[:name] = my_test_name
128+
driver = Selenium::WebDriver.for :remote, url: cloud_url, desired_capabilities: caps
129+
driver.get(url)
130+
driver.quit
131+
end
121132
end
122133
end

‎website_and_docs/content/documentation/webdriver/drivers/options.en.md‎

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -547,9 +547,10 @@ likely because the environment needs a proxy to be accessed.
547547

548548
Selenium WebDriver provides a way to proxy settings:
549549

550-
{{< tabpane langEqualsHeader=true >}}
550+
{{< tabpane text=true >}}
551551
{{< badge-examples >}}
552-
{{< tab header="Java" >}}
552+
{{% tab header="Java" %}}
553+
```java
553554
import org.openqa.selenium.Proxy;
554555
import org.openqa.selenium.WebDriver;
555556
import org.openqa.selenium.chrome.ChromeDriver;
@@ -567,8 +568,10 @@ public class ProxyTest {
567568
driver.quit();
568569
}
569570
}
570-
{{< /tab >}}
571-
{{< tab header="Python" >}}
571+
```
572+
{{% /tab %}}
573+
{{% tab header="Python" %}}
574+
```python
572575
from selenium import webdriver
573576

574577
PROXY = "<HOST:PORT>"
@@ -582,9 +585,10 @@ webdriver.DesiredCapabilities.FIREFOX['proxy'] = {
582585

583586
with webdriver.Firefox() as driver:
584587
driver.get("https://selenium.dev")
585-
586-
{{< /tab >}}
587-
{{< tab header="CSharp" >}}
588+
```
589+
{{% /tab %}}
590+
{{% tab header="CSharp" %}}
591+
```CSharp
588592
using OpenQA.Selenium;
589593
using OpenQA.Selenium.Chrome;
590594

@@ -601,11 +605,13 @@ IWebDriver driver = new ChromeDriver(options);
601605
driver.Navigate().GoToUrl("https://www.selenium.dev/");
602606
}
603607
}
604-
{{< /tab >}}
608+
```
609+
{{% /tab %}}
605610
{{< tab header="Ruby" >}}
606611
{{< gh-codeblock path="examples/ruby/spec/drivers/options_spec.rb#L87-L88" >}}
607612
{{< /tab >}}
608-
{{< tab header="JavaScript" >}}
613+
{{% tab header="JavaScript" %}}
614+
```javascript
609615
let webdriver = require('selenium-webdriver');
610616
let chrome = require('selenium-webdriver/chrome');
611617
let proxy = require('selenium-webdriver/proxy');
@@ -624,8 +630,10 @@ finally {
624630
await driver.quit();
625631
}
626632
}());
627-
{{< /tab >}}
628-
{{< tab header="Kotlin" >}}
633+
```
634+
{{% /tab %}}
635+
{{% tab header="Kotlin" %}}
636+
```kotlin
629637
import org.openqa.selenium.Proxy
630638
import org.openqa.selenium.WebDriver
631639
import org.openqa.selenium.chrome.ChromeDriver
@@ -644,5 +652,6 @@ fun main() {
644652
driver.quit()
645653
}
646654
}
647-
{{< /tab >}}
655+
```
656+
{{% /tab %}}
648657
{{< /tabpane >}}

‎website_and_docs/content/documentation/webdriver/drivers/options.ja.md‎

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,10 @@ Seleniumを使用した自動化スクリプト用のプロキシサーバーは
521521
Selenium WebDriverは設定をプロキシする方法を提供します。
522522

523523

524-
{{< tabpane langEqualsHeader=true >}}
525-
{{< tab header="Java" >}}
524+
{{< tabpane text=true >}}
525+
{{< badge-examples >}}
526+
{{% tab header="Java" %}}
527+
```java
526528
import org.openqa.selenium.Proxy;
527529
import org.openqa.selenium.WebDriver;
528530
import org.openqa.selenium.chrome.ChromeDriver;
@@ -540,8 +542,10 @@ public class ProxyTest {
540542
driver.quit();
541543
}
542544
}
543-
{{< /tab >}}
544-
{{< tab header="Python" >}}
545+
```
546+
{{% /tab %}}
547+
{{% tab header="Python" %}}
548+
```python
545549
from selenium import webdriver
546550

547551
PROXY = "<HOST:PORT>"
@@ -554,11 +558,11 @@ webdriver.DesiredCapabilities.FIREFOX['proxy'] = {
554558
}
555559

556560
with webdriver.Firefox() as driver:
557-
# Open URL
558561
driver.get("https://selenium.dev")
559-
560-
{{< /tab >}}
561-
{{< tab header="CSharp" >}}
562+
```
563+
{{% /tab %}}
564+
{{% tab header="CSharp" %}}
565+
```CSharp
562566
using OpenQA.Selenium;
563567
using OpenQA.Selenium.Chrome;
564568

@@ -575,11 +579,13 @@ IWebDriver driver = new ChromeDriver(options);
575579
driver.Navigate().GoToUrl("https://www.selenium.dev/");
576580
}
577581
}
578-
{{< /tab >}}
582+
```
583+
{{% /tab %}}
579584
{{< tab header="Ruby" >}}
580585
{{< gh-codeblock path="examples/ruby/spec/drivers/options_spec.rb#L87-L88" >}}
581586
{{< /tab >}}
582-
{{< tab header="JavaScript" >}}
587+
{{% tab header="JavaScript" %}}
588+
```javascript
583589
let webdriver = require('selenium-webdriver');
584590
let chrome = require('selenium-webdriver/chrome');
585591
let proxy = require('selenium-webdriver/proxy');
@@ -598,8 +604,10 @@ finally {
598604
await driver.quit();
599605
}
600606
}());
601-
{{< /tab >}}
602-
{{< tab header="Kotlin" >}}
607+
```
608+
{{% /tab %}}
609+
{{% tab header="Kotlin" %}}
610+
```kotlin
603611
import org.openqa.selenium.Proxy
604612
import org.openqa.selenium.WebDriver
605613
import org.openqa.selenium.chrome.ChromeDriver
@@ -618,5 +626,6 @@ fun main() {
618626
driver.quit()
619627
}
620628
}
621-
{{< /tab >}}
629+
```
630+
{{% /tab %}}
622631
{{< /tabpane >}}

‎website_and_docs/content/documentation/webdriver/drivers/options.pt-br.md‎

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -563,8 +563,10 @@ likely because the environment needs a proxy to be accessed.
563563

564564
Selenium WebDriver provides a way to proxy settings:
565565

566-
{{< tabpane langEqualsHeader=true >}}
567-
{{< tab header="Java" >}}
566+
{{< tabpane text=true >}}
567+
{{< badge-examples >}}
568+
{{% tab header="Java" %}}
569+
```java
568570
import org.openqa.selenium.Proxy;
569571
import org.openqa.selenium.WebDriver;
570572
import org.openqa.selenium.chrome.ChromeDriver;
@@ -582,8 +584,10 @@ public class ProxyTest {
582584
driver.quit();
583585
}
584586
}
585-
{{< /tab >}}
586-
{{< tab header="Python" >}}
587+
```
588+
{{% /tab %}}
589+
{{% tab header="Python" %}}
590+
```python
587591
from selenium import webdriver
588592

589593
PROXY = "<HOST:PORT>"
@@ -597,9 +601,10 @@ webdriver.DesiredCapabilities.FIREFOX['proxy'] = {
597601

598602
with webdriver.Firefox() as driver:
599603
driver.get("https://selenium.dev")
600-
601-
{{< /tab >}}
602-
{{< tab header="CSharp" >}}
604+
```
605+
{{% /tab %}}
606+
{{% tab header="CSharp" %}}
607+
```CSharp
603608
using OpenQA.Selenium;
604609
using OpenQA.Selenium.Chrome;
605610

@@ -616,11 +621,13 @@ IWebDriver driver = new ChromeDriver(options);
616621
driver.Navigate().GoToUrl("https://www.selenium.dev/");
617622
}
618623
}
619-
{{< /tab >}}
624+
```
625+
{{% /tab %}}
620626
{{< tab header="Ruby" >}}
621627
{{< gh-codeblock path="examples/ruby/spec/drivers/options_spec.rb#L87-L88" >}}
622628
{{< /tab >}}
623-
{{< tab header="JavaScript" >}}
629+
{{% tab header="JavaScript" %}}
630+
```javascript
624631
let webdriver = require('selenium-webdriver');
625632
let chrome = require('selenium-webdriver/chrome');
626633
let proxy = require('selenium-webdriver/proxy');
@@ -639,8 +646,10 @@ finally {
639646
await driver.quit();
640647
}
641648
}());
642-
{{< /tab >}}
643-
{{< tab header="Kotlin" >}}
649+
```
650+
{{% /tab %}}
651+
{{% tab header="Kotlin" %}}
652+
```kotlin
644653
import org.openqa.selenium.Proxy
645654
import org.openqa.selenium.WebDriver
646655
import org.openqa.selenium.chrome.ChromeDriver
@@ -659,5 +668,6 @@ fun main() {
659668
driver.quit()
660669
}
661670
}
662-
{{< /tab >}}
671+
```
672+
{{% /tab %}}
663673
{{< /tabpane >}}

‎website_and_docs/content/documentation/webdriver/drivers/options.zh-cn.md‎

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,10 @@ WebDriver创建新会话时,
550550

551551
Selenium WebDriver提供了如下设置代理的方法
552552

553-
{{< tabpane langEqualsHeader=true >}}
554-
{{< tab header="Java" >}}
553+
{{< tabpane text=true >}}
554+
{{< badge-examples >}}
555+
{{% tab header="Java" %}}
556+
```java
555557
import org.openqa.selenium.Proxy;
556558
import org.openqa.selenium.WebDriver;
557559
import org.openqa.selenium.chrome.ChromeDriver;
@@ -569,8 +571,10 @@ public class ProxyTest {
569571
driver.quit();
570572
}
571573
}
572-
{{< /tab >}}
573-
{{< tab header="Python" >}}
574+
```
575+
{{% /tab %}}
576+
{{% tab header="Python" %}}
577+
```python
574578
from selenium import webdriver
575579

576580
PROXY = "<HOST:PORT>"
@@ -583,11 +587,11 @@ webdriver.DesiredCapabilities.FIREFOX['proxy'] = {
583587
}
584588

585589
with webdriver.Firefox() as driver:
586-
# Open URL
587590
driver.get("https://selenium.dev")
588-
589-
{{< /tab >}}
590-
{{< tab header="CSharp" >}}
591+
```
592+
{{% /tab %}}
593+
{{% tab header="CSharp" %}}
594+
```CSharp
591595
using OpenQA.Selenium;
592596
using OpenQA.Selenium.Chrome;
593597

@@ -604,11 +608,13 @@ IWebDriver driver = new ChromeDriver(options);
604608
driver.Navigate().GoToUrl("https://www.selenium.dev/");
605609
}
606610
}
607-
{{< /tab >}}
611+
```
612+
{{% /tab %}}
608613
{{< tab header="Ruby" >}}
609614
{{< gh-codeblock path="examples/ruby/spec/drivers/options_spec.rb#L87-L88" >}}
610615
{{< /tab >}}
611-
{{< tab header="JavaScript" >}}
616+
{{% tab header="JavaScript" %}}
617+
```javascript
612618
let webdriver = require('selenium-webdriver');
613619
let chrome = require('selenium-webdriver/chrome');
614620
let proxy = require('selenium-webdriver/proxy');
@@ -627,8 +633,10 @@ finally {
627633
await driver.quit();
628634
}
629635
}());
630-
{{< /tab >}}
631-
{{< tab header="Kotlin" >}}
636+
```
637+
{{% /tab %}}
638+
{{% tab header="Kotlin" %}}
639+
```kotlin
632640
import org.openqa.selenium.Proxy
633641
import org.openqa.selenium.WebDriver
634642
import org.openqa.selenium.chrome.ChromeDriver
@@ -647,5 +655,6 @@ fun main() {
647655
driver.quit()
648656
}
649657
}
650-
{{< /tab >}}
658+
```
659+
{{% /tab %}}
651660
{{< /tabpane >}}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /