1. Installed python 2.7.5
2. Added python path to the environment variables.Example: C:\Python27;C:\Python27\Scripts;C:\Python27\DLLs;C:\Python27\Lib;C:\Python27\Lib\lib-tk
3. Installed Robotframework-2.7.7, robotframework_selenium2library-1.4.0, selenium-2.37, decorator-3.4.0-py2.7 using pip
4. then executed the
*** Documentation ***
test cases to sample
*** Settings ***
Library Selenium2Library
*** Testcases ***
Search Should Succeed When Keys are Entered
Open Browser http://www.google.com
Browser is opening successfully and not navigating to the url, But it is failing with the below error
WebDriverException: Message: '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR
/html4/strict.dtd">\r\n<HTML><HEAD><TITLE>Not Found</TITLE>\r\n<META HTTP-EQUIV="Content-Type" Conte
nt="text/html; charset=us-ascii"></HEAD>\r\n<BODY><h2>Not Found</h2>\r\n<hr><p>HTTP Error 404. The r
equested resource is not found.</p>\r\n</BODY></HTML>\r\n'
Tried even with the profile, but didnt help.Kindly help on this :-(.
Thanks
AjithFull Name: | Rfsample.Search Should Succeed When Keys are Entered |
---|---|
Start / End / Elapsed: | 20131103 21:31:15.493 / 20131103 21:31:20.924 / 00:00:05.431 |
Status: | FAIL (critical) |
Message: | WebDriverException: Message: '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">\r\n<HTML><HEAD><TITLE>Not Found</TITLE>\r\n<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>\r\n<BODY><h2>Not Found</h2>\r\n<hr><p>HTTP Error 404. The requested resource is not found.</p>\r\n</BODY></HTML>\r\n' |
Documentation: | Opens a new browser instance to given URL. |
---|---|
Start / End / Elapsed: | 20131103 21:31:15.509 / 20131103 21:31:20.924 / 00:00:05.415 |
Documentation: | Takes a screenshot of the current page and embeds it into the log. |
---|---|
Start / End / Elapsed: | 20131103 21:31:20.909 / 20131103 21:31:20.924 / 00:00:00.015 |
21:31:20.909 | FAIL | No browser is open |
21:31:20.924 | DEBUG | Traceback (most recent call last): File "<string>", line 2, in capture_page_screenshot File "C:\Python27\lib\site-packages\Selenium2Library\keywords\keywordgroup.py", line 12, in _run_on_failure_decorator return method(*args, **kwargs) File "C:\Python27\lib\site-packages\Selenium2Library\keywords\_screenshot.py", line 28, in capture_page_screenshot if hasattr(self._current_browser(), 'get_screenshot_as_file'): File "C:\Python27\lib\site-packages\Selenium2Library\keywords\_browsermanagement.py", line 415, in _current_browser raise RuntimeError('No browser is open') |
21:31:15.509 | INFO | Opening browser 'firefox' to base url 'http://www.google.com' |
21:31:20.862 | DEBUG | POST http://127.0.0.1:58001/hub/session {"sessionId": null, "desiredCapabilities": {"platform": "ANY", "browserName": "firefox", "version": "", "javascriptEnabled": true}} |
21:31:20.924 | WARN | Keyword 'Capture Page Screenshot' could not be run on failure: No browser is open |
21:31:20.924 | FAIL | WebDriverException: Message: '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">\r\n<HTML><HEAD><TITLE>Not Found</TITLE>\r\n<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>\r\n<BODY><h2>Not Found</h2>\r\n<hr><p>HTTP Error 404. The requested resource is not found.</p>\r\n</BODY></HTML>\r\n' |
21:31:20.924 | DEBUG | Traceback (most recent call last): File "<string>", line 2, in open_browser File "C:\Python27\lib\site-packages\Selenium2Library\keywords\keywordgroup.py", line 12, in _run_on_failure_decorator return method(*args, **kwargs) File "C:\Python27\lib\site-packages\Selenium2Library\keywords\_browsermanagement.py", line 111, in open_browser browser = self._make_browser(browser_name,desired_capabilities,ff_profile_dir,remote_url) File "C:\Python27\lib\site-packages\Selenium2Library\keywords\_browsermanagement.py", line 429, in _make_browser browser = creation_func(remote, desired_capabilities, profile_dir) File "C:\Python27\lib\site-packages\Selenium2Library\keywords\_browsermanagement.py", line 445, in _make_ff browser = webdriver.Firefox(firefox_profile=profile) File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 61, in __init__ desired_capabilities=capabilities) File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 71, in __init__ self.start_session(desired_capabilities, browser_profile) File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 113, in start_session 'desiredCapabilities': desired_capabilities, File "C:\Python27\lib\site-packages\Selenium2Library\webdrivermonkeypatches.py", line 11, in execute result = self._base_execute(driver_command, params) File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 164, in execute self.error_handler.check_response(response) File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 136, in check_response raise exception_class(value) |