You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website_and_docs/content/documentation/webdriver/getting_started/using_selenium.ja.md
+27-14Lines changed: 27 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -3,16 +3,16 @@ title: "Organizing and Executing Selenium Code"
3
3
linkTitle: "Using Selenium"
4
4
weight: 10
5
5
description: >
6
-
Scaling Selenium execution with an IDE and a Test Runner library
6
+
Scaling Selenium execution with an IDE and a Test Runner library
7
7
---
8
8
9
-
If you want to run more than a handful of one-off scripts, you need to
9
+
If you want to run more than a handful of one-off scripts, you need to
10
10
be able to organize and work with your code. This page should give you
11
11
ideas for how to actually do productive things with your Selenium code.
12
12
13
13
## Common Uses
14
14
15
-
Most people use Selenium to execute automated tests for web applications,
15
+
Most people use Selenium to execute automated tests for web applications,
16
16
but Selenium support any use case of browser automation.
17
17
18
18
### Repetitive Tasks
@@ -32,10 +32,9 @@ Running Selenium for testing requires making assertions on actions taken by Sele
32
32
So a good assertion library is required. Additional features to provide structure for tests
33
33
require use of [Test Runner](#test-runners).
34
34
35
-
36
35
## IDEs
37
36
38
-
Regardless of how you use Selenium code,
37
+
Regardless of how you use Selenium code,
39
38
you won't be very effective writing or executing it without a good
40
39
Integrated Developer Environment. Here are some common options...
41
40
@@ -50,10 +49,11 @@ Integrated Developer Environment. Here are some common options...
50
49
## Test Runner
51
50
52
51
Even if you aren't using Selenium for testing, if you have advanced use cases, it might make
53
-
sense to use a test runner to better organize your code. Being able to use before/after hooks
52
+
sense to use a test runner to better organize your code. Being able to use before/after hooks
54
53
and run things in groups or in parallel can be very useful.
55
54
56
55
### Choosing
56
+
57
57
There are many different test runners available.
58
58
59
59
All the code examples in this documentation can be found in (or is being moved to) our
@@ -63,36 +63,40 @@ that will be used for all examples on this page.
63
63
64
64
{{< tabpane text=true >}}
65
65
{{% tab header="Java" %}}
66
+
66
67
-[JUnit](https://junit.org/junit5/) - A widely-used testing framework for Java-based Selenium tests.
67
68
-[TestNG](https://testng.org/) - Offers extra features like parallel test execution and parameterized tests.
68
-
{{% /tab %}}
69
+
{{% /tab %}}
69
70
70
71
{{% tab header="Python" %}}
72
+
71
73
-[pytest](https://pytest.org/) - A preferred choice for many, thanks to its simplicity and powerful plugins.
72
74
-[unittest](https://docs.python.org/3/library/unittest.html) - Python's standard library testing framework.
73
-
{{% /tab %}}
75
+
{{% /tab %}}
74
76
75
77
{{% tab header="CSharp" %}}
78
+
76
79
-[NUnit](https://nunit.org/) - A popular unit-testing framework for .NET.
77
80
-[MS Test](https://docs.microsoft.com/en-us/visualstudio/test/getting-started-with-unit-testing?view=vs-2019) - Microsoft's own unit testing framework.
78
-
{{% /tab %}}
81
+
{{% /tab %}}
79
82
80
83
{{% tab header="Ruby" %}}
84
+
81
85
-[RSpec](https://rspec.info/) - The most widely used testing library for running Selenium tests in Ruby.
82
86
-[Minitest](https://github.com/seattlerb/minitest) - A lightweight testing framework that comes with Ruby standard library.
83
-
{{% /tab %}}
87
+
{{% /tab %}}
84
88
85
89
{{% tab header="JavaScript" %}}
90
+
86
91
-[Jest](https://jestjs.io/) - Primarily known as a testing framework for React, it can also be used for Selenium tests.
87
92
-[Mocha](https://mochajs.org/) - The most common JS library for running Selenium tests.
88
-
{{% /tab %}}
93
+
{{% /tab %}}
89
94
90
95
{{% tab header="Kotlin" %}}
91
96
92
97
{{% /tab %}}
93
98
{{< /tabpane >}}
94
99
95
-
96
100
### Installing
97
101
98
102
This is very similar to what was required in [Install a Selenium Library]({{< ref "install_library.md" >}}).
@@ -130,9 +134,12 @@ In your project's `package.json`, add requirement to `dependencies`:
130
134
131
135
### Asserting
132
136
137
+
Assertions are very important part of Selenium, as they determine whether the state
138
+
of the application is same what we are expecting or not. If the assertion fails,
139
+
then the test case is failed and execution is stopped.
0 commit comments