pySaunter not running on chrome

71 views
Skip to first unread message

thirumal rao

unread,
Sep 19, 2013, 5:26:58 AM9/19/13
to sau...@googlegroups.com
Hi, 

I was trying to run test scripts on google chrome. For this, I updated the saunter.ini file 
with browser = *chrome and provided the correct chromedriver path.(Have downloaded chromedriver from http://code.google.com/p/selenium/wiki/ChromeDriver)


When I executed the script, I got a webdriver exception and a 'No attribute error'. Have pasted the exceptions below. 

Out of curiosity, when I looked into saunter/testcase/webdriver.py, I noticed that chrome is handled in a different way than firefox. Also, I could not find 'profile' parameter being passed for chrome to 

self.driver = WebDriver(desired_capabilities = desired_capabilities, command_executor = command_executor, browser_profile=profile)

This may not be the cause, just thought of sharing it.

Can someone please tell me what more needs to be added/modified in saunter.ini file to make the scripts work on non-firefox browsers.

 
---------------------------------------------------------------------------------------------------------
E       WebDriverException: Message: u'The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see http://code.google.com/p/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://code.google.com/p/chromedriver/downloads/list' ; Stacktrace: 
E           at com.google.common.base.Preconditions.checkState (Preconditions.java:176)
E           at org.openqa.selenium.remote.service.DriverService.findExecutable (DriverService.java:105)
E           at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService (ChromeDriverService.java:75)
E           at org.openqa.selenium.chrome.ChromeDriver.<init> (ChromeDriver.java:129)
E           at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (NativeConstructorAccessorImpl.java:-2)
E           at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:39)
E           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:27)
E           at java.lang.reflect.Constructor.newInstance (Constructor.java:513)
E           at org.openqa.selenium.remote.server.DefaultDriverFactory.callConstructor (DefaultDriverFactory.java:57)
E           at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance (DefaultDriverFactory.java:51)
E           at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call (DefaultSession.java:215)
E           at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call (DefaultSession.java:1)
E           at java.util.concurrent.FutureTask$Sync.innerRun (FutureTask.java:303)
E           at java.util.concurrent.FutureTask.run (FutureTask.java:138)
E           at org.openqa.selenium.remote.server.DefaultSession$1.run (DefaultSession.java:169)
E           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask (ThreadPoolExecutor.java:895)
E           at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:918)
E           at java.lang.Thread.run (Thread.java:680)

/Library/Python/2.7/site-packages/selenium/webdriver/remote/errorhandler.py:164: WebDriverException


---------------------------------------------------------------------------------------------------------
def take_named_screenshot(self, name):
        method_dir = self._screenshot_prep_dirs()
    
        image_path = os.path.join(method_dir, str(name) + ".png")
>       self.driver.get_screenshot_as_file(image_path)
E       AttributeError: 'TestAppIDs' object has no attribute 'driver'


PS: pySaunter version is 0.59


Thirumal
--
"Peace cannot be kept by force. It can only be achieved by understanding."

http://www.raoathisbest.blogspot.com

Adam Goucher

unread,
Sep 19, 2013, 8:35:58 AM9/19/13
to sau...@googlegroups.com
When you start the se-server, you need to start it with the argument

-Dwebdriver.chrome.driver=path/to/chromedriver

The same applies for IE and soon Firefox.

-adam
> --
> You received this message because you are subscribed to the Google
> Groups "Saunter" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to saunter+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

thirumal rao

unread,
Sep 19, 2013, 11:15:48 AM9/19/13
to sau...@googlegroups.com
Thanks Adam ! It worked.

- Thirumal


To unsubscribe from this group and stop receiving emails from it, send an email to saunter+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Saunter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to saunter+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages