Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
Lesson49
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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
Пасько Виталий
Lesson49
Commits
2eac9d54
Commit
2eac9d54
authored
Oct 18, 2022
by
Пасько Виталий
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Рефакторинг
parent
0728f409
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
BasicSteps.cs
PhoneStore.Tests/Helpers/BasicSteps.cs
+11
-11
No files found.
PhoneStore.Tests/Helpers/BasicSteps.cs
View file @
2eac9d54
...
...
@@ -20,13 +20,6 @@ namespace PhoneStore.Tests.Helpers
_driver
.
Quit
();
_driver
.
Close
();
}
public
bool
IsElementFound
(
string
text
)
{
var
element
=
_driver
.
FindElement
(
By
.
XPath
(
$"//*[contains(text(), '
{
text
}
')]"
));
return
element
!=
null
;
}
public
void
GoToUrl
(
string
url
)
{
_driver
.
Navigate
().
GoToUrl
(
url
);
...
...
@@ -44,10 +37,10 @@ namespace PhoneStore.Tests.Helpers
{
GoToUrl
(
RegisterUrl
);
}
public
void
ClickButtonById
(
string
id
)
public
bool
IsElementFound
(
string
text
)
{
_driver
.
FindElement
(
By
.
Id
(
id
)).
Click
();
var
element
=
_driver
.
FindElement
(
By
.
XPath
(
$"//*[contains(text(), '
{
text
}
')]"
));
return
element
!=
null
;
}
public
void
FillFormField
(
string
fieldId
,
string
text
)
...
...
@@ -55,5 +48,12 @@ namespace PhoneStore.Tests.Helpers
var
field
=
_driver
.
FindElement
(
By
.
Id
(
fieldId
));
field
.
SendKeys
(
text
);
}
public
void
ClickButtonById
(
string
id
)
{
_driver
.
FindElement
(
By
.
Id
(
id
)).
Click
();
}
}
}
\ No newline at end of file
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