Skip to content

Conversation

@ywang0701
Copy link

No description provided.

Copy link
Member

@JesseZhuang JesseZhuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix pep8 error for this file selenium2.py.



class PythonOrgSearch(unittest.TestCase):

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is phantomjs? any traps for installation on Linux 64, Mac, and Windows?

value = element.find('value').text
return value

def getSearchBy(pagenameattribute, elementkeystring):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getSearchBy() never used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants