Skip to content

Commit

Permalink
Merge branch 'trunk' into pallavi-frame-csharp
Browse files Browse the repository at this point in the history
  • Loading branch information
harsha509 authored Sep 26, 2024
2 parents 12909e3 + 914d0c5 commit cee77f2
Show file tree
Hide file tree
Showing 13 changed files with 99 additions and 15 deletions.
48 changes: 48 additions & 0 deletions examples/dotnet/SeleniumDocs/Interactions/InteractionsTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.


using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
namespace SeleniumDocumentation.SeleniumInteractions
{
[TestClass]
public class InteractionsTest
{
[TestMethod]
public void TestInteractions()
{
WebDriver driver = new ChromeDriver();
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromMilliseconds(500);

// Navigate to Url
driver.Url="https://www.selenium.dev/";
//GetTitle
String title = driver.Title;
Assert.AreEqual(title, "Selenium");

//GetCurrentURL
String url = driver.Url;
Assert.AreEqual(url, "https://www.selenium.dev/");

//quitting driver
driver.Quit(); //close all windows
}
}
}
2 changes: 1 addition & 1 deletion examples/java/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion examples/ruby/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ gem 'rspec', '~> 3.0'
gem 'rubocop', '~> 1.35'
gem 'rubocop-rspec', '~> 3.0'
gem 'selenium-devtools', '= 0.129.0'
gem 'selenium-webdriver', '= 4.24.0'
gem 'selenium-webdriver', '= 4.25.0'
4 changes: 2 additions & 2 deletions examples/ruby/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ GEM
rubyzip (2.3.2)
selenium-devtools (0.129.0)
selenium-webdriver (~> 4.2)
selenium-webdriver (4.24.0)
selenium-webdriver (4.25.0)
base64 (~> 0.2)
logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5)
Expand All @@ -71,7 +71,7 @@ DEPENDENCIES
rubocop (~> 1.35)
rubocop-rspec (~> 3.0)
selenium-devtools (= 0.129.0)
selenium-webdriver (= 4.24.0)
selenium-webdriver (= 4.25.0)

BUNDLED WITH
2.5.6
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ test e.g. invalid order records.

* Create a new WebDriver instance per test. This helps ensure test isolation
and makes parallelization simpler.

* If you choose [pytest](https://pytest.org/) as your test runner, this can be
easily done by yielding your driver in a global fixture. This way each test gets its own
driver instance, and you can ensure that drivers always quit after a test is finished
(pass or fail).
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ aliases: [

* テストごとに新しいWebDriverインスタンスを作成します。
これにより、テストの分離が保証され、並列化がより簡単になります。

* If you choose [pytest](https://pytest.org/) as your test runner, this can be
easily done by yielding your driver in a global fixture. This way each test gets its own
driver instance, and you can ensure that drivers always quit after a test is finished
(pass or fail).
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ teste, por exemplo registros de pedidos inválidos.

* Crie uma nova instância do WebDriver por teste. Isso ajuda a garantir o isolamento do teste
e torna a paralelização mais simples.

* If you choose [pytest](https://pytest.org/) as your test runner, this can be
easily done by yielding your driver in a global fixture. This way each test gets its own
driver instance, and you can ensure that drivers always quit after a test is finished
(pass or fail).
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ aliases: [

* 每次测试都创建一个新的WebDriver实例.
这在确保测试隔离的同时可以保障并行化更为简单.

* If you choose [pytest](https://pytest.org/) as your test runner, this can be
easily done by yielding your driver in a global fixture. This way each test gets its own
driver instance, and you can ensure that drivers always quit after a test is finished
(pass or fail).
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ In order to use WebDriver BiDi, setting the capability in the browser options wi

{{< tabpane langEqualsHeader=true >}}
{{< tab header="Java" >}}
options.setCapability("webSocketUrl", true);
options.setCapability("webSocketUrl", true);
{{< /tab >}}
{{% tab header="Python" text=true %}}
{{< badge-code >}}
{{< tab header="Python" >}}
options.enable_bidi = True
{{% /tab %}}
{{< tab header="CSharp" >}}
UseWebSocketUrl = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ You can read the current page title from the browser:
{{< tab header="Python" text=true >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_interactions.py#L7" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}driver.Title;{{< /tab >}}
{{< tab header="CSharp" text=true >}}
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/InteractionsTest.cs#L37" >}}
{{< /tab >}}
{{< tab header="Ruby" text=true >}}
{{< gh-codeblock path="examples/ruby/spec/interactions/browser_spec.rb#L8" >}}
{{< /tab >}}
Expand All @@ -46,7 +48,9 @@ You can read the current URL from the browser's address bar using:
{{< tab header="Python" text=true >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_interactions.py#L10" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}driver.Url;{{< /tab >}}
{{< tab header="CSharp" text=true >}}
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/InteractionsTest.cs#L41" >}}
{{< /tab >}}
{{< tab header="Ruby" text=true >}}
{{< gh-codeblock path="examples/ruby/spec/interactions/browser_spec.rb#L14" >}}
{{< /tab >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ aliases: [
{{< tab header="Python" text=true >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_interactions.py#L7" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}driver.Title;{{< /tab >}}
{{< tab header="CSharp" text=true >}}
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/InteractionsTest.cs#L37" >}}
{{< /tab >}}
{{< tab header="Ruby" text=true >}}
{{< gh-codeblock path="examples/ruby/spec/interactions/browser_spec.rb#L8" >}}
{{< /tab >}}
Expand All @@ -44,7 +46,9 @@ aliases: [
{{< tab header="Python" text=true >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_interactions.py#L10" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}driver.Url;{{< /tab >}}
{{< tab header="CSharp" text=true >}}
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/InteractionsTest.cs#L41" >}}
{{< /tab >}}
{{< tab header="Ruby" text=true >}}
{{< gh-codeblock path="examples/ruby/spec/interactions/browser_spec.rb#L14" >}}
{{< /tab >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ Você pode ler o título da página atual no navegador:
{{< tab header="Python" text=true >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_interactions.py#L7" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}driver.Title;{{< /tab >}}
{{< tab header="CSharp" text=true >}}
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/InteractionsTest.cs#L37" >}}
{{< /tab >}}
{{< tab header="Ruby" text=true >}}
{{< gh-codeblock path="examples/ruby/spec/interactions/browser_spec.rb#L8" >}}
{{< /tab >}}
Expand All @@ -45,7 +47,9 @@ Você pode ler a URL atual na barra de endereço do navegador usando:
{{< tab header="Python" text=true >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_interactions.py#L10" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}driver.Url;{{< /tab >}}
{{< tab header="CSharp" text=true >}}
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/InteractionsTest.cs#L41" >}}
{{< /tab >}}
{{< tab header="Ruby" text=true >}}
{{< gh-codeblock path="examples/ruby/spec/interactions/browser_spec.rb#L14" >}}
{{< /tab >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ aliases: [
{{< tab header="Python" text=true >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_interactions.py#L7" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}driver.Title;{{< /tab >}}
{{< tab header="CSharp" text=true >}}
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/InteractionsTest.cs#L37" >}}
{{< /tab >}}
{{< tab header="Ruby" text=true >}}
{{< gh-codeblock path="examples/ruby/spec/interactions/browser_spec.rb#L8" >}}
{{< /tab >}}
Expand All @@ -43,7 +45,9 @@ aliases: [
{{< tab header="Python" text=true >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_interactions.py#L10" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}driver.Url;{{< /tab >}}
{{< tab header="CSharp" text=true >}}
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/InteractionsTest.cs#L41" >}}
{{< /tab >}}
{{< tab header="Ruby" text=true >}}
{{< gh-codeblock path="examples/ruby/spec/interactions/browser_spec.rb#L14" >}}
{{< /tab >}}
Expand Down

0 comments on commit cee77f2

Please sign in to comment.