Conversation
JesseZhuang
requested changes
Sep 24, 2016
Member
JesseZhuang
left a comment
There was a problem hiding this comment.
selenium2.py passed without any error, hooray!
Now we need to fix the rest.
| def test_login(self): | ||
| driver = self.driver | ||
| driver.get("http://manage.mcafee.com") | ||
| assert "Log On" in driver.title |
Member
There was a problem hiding this comment.
Failed test
F
======================================================================
FAIL: test_login (__main__.ePO_login)
----------------------------------------------------------------------
Traceback (most recent call last):
File "ePO_Login.py", line 43, in test_login
assert "Log On" in driver.title
AssertionError
----------------------------------------------------------------------
Ran 1 test in 3.880s
FAILED (failures=1)
| tree = ET.parse('SiteElement.xml') | ||
| root = tree.getroot() | ||
|
|
||
| def getSearchValue(pagenameattribute, elementkeystring): |
Member
There was a problem hiding this comment.
please fix pep8 error for this file selenium2.py.
|
|
||
|
|
||
| class PythonOrgSearch(unittest.TestCase): | ||
|
|
Member
There was a problem hiding this comment.
EE.
======================================================================
ERROR: test_explicit_wait (__main__.PythonOrgSearch)
----------------------------------------------------------------------
Traceback (most recent call last):
File "selenium1.py", line 42, in test_explicit_wait
EC.presence_of_element_located((By.ID, "myDynamicElement")))
File "/home/zexi/pyenvs/iclp3test/lib/python3.4/site-packages/selenium/webdriver/support/wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
Stacktrace:
at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmp28b4_2lv/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
at FirefoxDriver.prototype.findElement (file:///tmp/tmp28b4_2lv/extensions/fxdriver@googlecode.com/components/driver-component.js:10779)
at DelayedCommand.prototype.executeInternal_/h (file:///tmp/tmp28b4_2lv/extensions/fxdriver@googlecode.com/components/command-processor.js:12661)
at DelayedCommand.prototype.executeInternal_ (file:///tmp/tmp28b4_2lv/extensions/fxdriver@googlecode.com/components/command-processor.js:12666)
at DelayedCommand.prototype.execute/< (file:///tmp/tmp28b4_2lv/extensions/fxdriver@googlecode.com/components/command-processor.js:12608)
======================================================================
ERROR: test_implicit_wait (__main__.PythonOrgSearch)
----------------------------------------------------------------------
Traceback (most recent call last):
File "selenium1.py", line 48, in test_implicit_wait
myDynamicElement = driver.find_element_by_id("myDynamicElement")
File "/home/zexi/pyenvs/iclp3test/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 269, in find_element_by_id
return self.find_element(by=By.ID, value=id_)
File "/home/zexi/pyenvs/iclp3test/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 752, in find_element
'value': value})['value']
File "/home/zexi/pyenvs/iclp3test/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/home/zexi/pyenvs/iclp3test/lib/python3.4/site-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: {"method":"id","selector":"myDynamicElement"}
Stacktrace:
at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpcasyjxa_/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpcasyjxa_/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
----------------------------------------------------------------------
Ran 3 tests in 26.584s
FAILED (errors=2)
| form = PageElement(tag_name='form') | ||
|
|
||
|
|
||
| driver = webdriver.PhantomJS() |
Member
There was a problem hiding this comment.
What is phantomjs? any traps for installation on Linux 64, Mac, and Windows?
JesseZhuang
reviewed
Sep 25, 2016
| value = element.find('value').text | ||
| return value | ||
|
|
||
| def getSearchBy(pagenameattribute, elementkeystring): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.