Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lab-1-wang-alec-185292-willowisp
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
Alec
lab-1-wang-alec-185292-willowisp
Commits
e1f844be
Commit
e1f844be
authored
Mar 07, 2020
by
Alec Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added time module and sleep methods to functional test
parent
26acbbaf
Pipeline
#911
failed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
geckodriver.log
geckodriver.log
+16
-0
tests.cpython-38.pyc
heroes/__pycache__/tests.cpython-38.pyc
+0
-0
lab1_functional_test.py
lab1_functional_test.py
+5
-2
No files found.
geckodriver.log
View file @
e1f844be
...
@@ -367,3 +367,19 @@ JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't fin
...
@@ -367,3 +367,19 @@ JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't fin
1583596509951 Marionette INFO Listening on port 65334
1583596509951 Marionette INFO Listening on port 65334
1583596510082 Marionette WARN TLS certificate errors will be ignored for this session
1583596510082 Marionette WARN TLS certificate errors will be ignored for this session
1583596510654 Marionette INFO Stopped listening on port 65334
1583596510654 Marionette INFO Stopped listening on port 65334
1583596668510 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\alswa\\AppData\\Local\\Temp\\rust_mozprofilesp6941"
1583596668805 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1583596669126 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1583596669126 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1583596669126 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1583596669126 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
1583596670482 Marionette INFO Listening on port 65471
1583596670534 Marionette WARN TLS certificate errors will be ignored for this session
1583596675090 Marionette INFO Stopped listening on port 65471
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv
heroes/__pycache__/tests.cpython-38.pyc
View file @
e1f844be
No preview for this file type
lab1_functional_test.py
View file @
e1f844be
from
selenium
import
webdriver
from
selenium
import
webdriver
import
unittest
import
unittest
import
time
class
NewVisitorTest
(
unittest
.
TestCase
):
class
NewVisitorTest
(
unittest
.
TestCase
):
...
@@ -17,20 +18,22 @@ class NewVisitorTest(unittest.TestCase):
...
@@ -17,20 +18,22 @@ class NewVisitorTest(unittest.TestCase):
# She notices the page title and header mention
# She notices the page title and header mention
# 'The Will of the Wisps Wiki'
# 'The Will of the Wisps Wiki'
self
.
assertIn
(
'The Will of the Wisps Wiki'
,
self
.
browser
.
title
)
self
.
assertIn
(
'The Will of the Wisps Wiki'
,
self
.
browser
.
title
)
time
.
sleep
(
1
)
# She sees a list containing three heroes with their corresponding
# She sees a list containing three heroes with their corresponding
# names, health points, and damage
# names, health points, and damage
self
.
assertIn
(
'Cloud(HP:600,Damage:57)'
,
self
.
browser
.
page_source
)
self
.
assertIn
(
'Cloud(HP:600,Damage:57)'
,
self
.
browser
.
page_source
)
self
.
assertIn
(
'Sunflowey(HP:650,Damage:43)'
,
self
.
browser
.
page_source
)
self
.
assertIn
(
'Sunflowey(HP:650,Damage:43)'
,
self
.
browser
.
page_source
)
self
.
assertIn
(
'Jester(HP:660,Damage:64)'
,
self
.
browser
.
page_source
)
self
.
assertIn
(
'Jester(HP:660,Damage:64)'
,
self
.
browser
.
page_source
)
time
.
sleep
(
1
)
# When she selects one of the heroes, she is sent to another page
# When she selects one of the heroes, she is sent to another page
# containing more information about the hero (additional stats, lore, image).
# containing more information about the hero (additional stats, lore, image).
self
.
browser
.
find_element_by_link_text
(
self
.
browser
.
find_element_by_link_text
(
"Cloud(HP:600,Damage:57)"
)
.
click
()
"Cloud(HP:600,Damage:57)"
)
.
click
()
time
.
sleep
(
1
)
# She spots the page title and header mentions the name of the hero she selected.
# She spots the page title and header mentions the name of the hero she selected.
self
.
assertIn
(
'Cloud'
,
self
.
browser
.
title
)
self
.
assertIn
(
'Cloud'
,
self
.
browser
.
title
)
self
.
assertIn
(
'Cloud'
,
self
.
browser
.
page_source
)
self
.
assertIn
(
'Cloud'
,
self
.
browser
.
page_source
)
time
.
sleep
(
1
)
# While she is in a specific hero's page, she sees a button labeled "Back to Heroes List".
# While she is in a specific hero's page, she sees a button labeled "Back to Heroes List".
# She clicks this and she is redirected back to the wiki's homepage.
# She clicks this and she is redirected back to the wiki's homepage.
self
.
browser
.
find_element_by_css_selector
(
"input[type=submit]"
)
.
click
()
self
.
browser
.
find_element_by_css_selector
(
"input[type=submit]"
)
.
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