daluu / AutoItDriverServer

AutoIt through WebDriver or a webdriver-compatible server for AutoIt
30 stars 8 forks source link

Sample CalculatorTest.java throwing error #11

Closed snraj88 closed 8 years ago

snraj88 commented 8 years ago

I am facing issues (getting Attribute Error) while running CalculatorTest.java (not changed sample code) from eclipse. My java package included selenium library. Also AutoIt was installed in local machine along with AutoItX3_64.dll registered. AutoItDriverServer is running successfully on port 4723.

I have followed the instructions provided and can you please help me to resolve this issue?


Bottle v0.13-dev server starting up (using WSGIRefServer())... Listening on http://127.0.0.1:4723/ Hit Ctrl-C to quit.

Traceback (most recent call last): File "D:\autoitdriver\AutoItDriverServer-master\autoitdriverserver_python\bott le.py", line 996, in _inner_handle return route.call(*_args) File "D:\autoitdriver\AutoItDriverServer-master\autoitdriverserver_python\bott le.py", line 1954, in wrapper rv = callback(_a, **ka) File "server.py", line 78, in create_session app.caretCoordMode = dc.get('caretCoordMode') if dc.get('caretCoordMode') is not None else app.caretCoordMode File "D:\autoitdriver\AutoItDriverServer-master\autoitdriverserver_python\bott le.py", line 1139, in setattr raise AttributeError("Attribute %s already defined. Plugin conflict?" % name ) AttributeError: Attribute caretCoordMode already defined. Plugin conflict? 127.0.0.1 - - [27/Mar/2016 13:27:15] "POST /wd/hub/session HTTP/1.1" 500 761

daluu commented 8 years ago

What version of Python? I assume you're using 64-bit Python since you mentioned 64-bit AutoIt?

daluu commented 8 years ago

I'll take a look when I get a chance, didn't get to it today.

snraj88 commented 8 years ago

Yes, I am using 64-bit Python.

daluu commented 8 years ago

To aid in debugging, what version of Windows, Java (and I assume Java 64-bit?), and Selenium (for the Java bindings) are you using?

daluu commented 8 years ago

Likely found your problem - bad version of Bottle for Python installed. How did you even get the "0.13-dev" version? It's not the latest stable version, and shouldn't have been installed with

pip install -r requirements.txt or pip install bottle unless there was some weird pip issue. Anyhow, your fix would be:

Run pip uninstall bottle then run pip install bottle==0.12.9 which is the latest stable version, and I checked that works fine (at least on 32-bit python & AutoIt, 0.13-dev gave me the same error you got, on 32-bit). Version 0.12.8 would work too, that's the version I originally had.

snraj88 commented 8 years ago

Hi daluu,

It was my mistake, previously i had directly copied and placed bottle.py (also it happened to be unstable version 0.13 dev) thinking installation is not required. Now i have used pip install bottle==0.12.0 and it worked.

Thanks for your time and help. This looks to be useful to me.