Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SeleniumTraining
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Qazi Zain
SeleniumTraining
Commits
447b6997
Commit
447b6997
authored
Nov 06, 2024
by
Qazi Zain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fourth Commit Added Updated DropDown Don't having Select Option
parent
b35682a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
WebElementAutomation.java
...hniques_to_automate_web_Element/WebElementAutomation.java
+29
-1
No files found.
src/test/java/Techniques_to_automate_web_Element/WebElementAutomation.java
View file @
447b6997
...
...
@@ -7,7 +7,7 @@ import org.openqa.selenium.firefox.FirefoxDriver;
import
org.openqa.selenium.support.ui.Select
;
public
class
WebElementAutomation
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
throws
InterruptedException
{
WebDriver
obj
=
new
FirefoxDriver
();
// for maximizing the window.
obj
.
manage
().
window
().
maximize
();
...
...
@@ -26,6 +26,34 @@ public class WebElementAutomation {
System
.
out
.
println
(
StaticDropDown
.
getFirstSelectedOption
().
getText
());
//------------------------------------> updated Static DropDown <-------------------------------------------
Thread
.
sleep
(
2000
);
obj
.
findElement
(
By
.
cssSelector
(
"div#divpaxinfo"
)).
click
();
for
(
int
i
=
1
;
i
<=
2
;
i
++)
{
obj
.
findElement
(
By
.
cssSelector
(
"span#hrefIncAdt"
)).
click
();
}
Thread
.
sleep
(
2000
);
for
(
int
i
=
1
;
i
<=
3
;
i
++)
{
obj
.
findElement
(
By
.
cssSelector
(
"span#hrefIncChd"
)).
click
();
}
obj
.
findElement
(
By
.
cssSelector
(
"span#hrefDecChd"
)).
click
();
Thread
.
sleep
(
2000
);
for
(
int
i
=
1
;
i
<=
2
;
i
++)
{
obj
.
findElement
(
By
.
cssSelector
(
"span#hrefIncInf"
)).
click
();
}
Thread
.
sleep
(
2000
);
obj
.
findElement
(
By
.
id
(
"btnclosepaxoption"
)).
click
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment