fiuba08 / robotframework

Automatically exported from code.google.com/p/robotframework
Apache License 2.0
0 stars 0 forks source link

failed ImportError: No module named win32gui on Windows7 running robotframework #1398

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We arte experiencing Errors when we run Robotframe work on windows7. The Script 
runs and selenium launches the browser but we do not see our webpage loaded it 
remains in a blank state. We get this Error on RobotFramework.

c:\Python27\Scripts>jybot.bat c:\Automation\robot_framework\ui_testing\vuln_mgmt
\test_suites\login\invalid_login.txt
[ ERROR ] Error in file 'c:\Automation\robot_framework\ui_testing\common\lib\res
ources\standard.txt' in table 'Settings': Importing test library 'c:\Automation\
robot_framework\ui_testing\unity\lib\keywords\python_functions.py' failed: Impor
tError: No module named win32gui
Traceback (most recent call last):
  File "c:\Automation\robot_framework\ui_testing\unity\lib\keywords\python_funct
ions.py", line 9, in <module>
    import win32gui
PYTHONPATH:
  C:\Python27\Lib\site-packages\robot\libraries
  C:\Python27\Lib\site-packages
  C:\jython2.5.2\Lib
  __classpath__
  __pyclasspath__/
  C:\jython2.5.2\Lib\site-packages
  .
  c:\Python27\Scripts
CLASSPATH:
  C:\jython2.5.2\jython.jar
[ ERROR ] Error in file 'c:\Automation\robot_framework\ui_testing\common\lib\res
ources\standard.txt' in table 'Settings': Importing test library 'c:\Automation\
robot_framework\ui_testing\unity\lib\keywords\python_functions.py' failed: Impor
tError: No module named win32gui
Traceback (most recent call last):
  File "c:\Automation\robot_framework\ui_testing\unity\lib\keywords\python_funct
ions.py", line 9, in <module>
    import win32gui
PYTHONPATH:
  C:\Python27\Lib\site-packages\robot\libraries
  C:\Python27\Lib\site-packages
  C:\jython2.5.2\Lib
  __classpath__
  __pyclasspath__/
  C:\jython2.5.2\Lib\site-packages
  .
  c:\Python27\Scripts
CLASSPATH:
  C:\jython2.5.2\jython.jar

For some reason win32Gui cannot be found but it is installed.I made my own 
python script to call win32Gui and it runs well. It cannot find it when I use 
Robot. 

Original issue reported on code.google.com by wachk...@gmail.com on 28 Mar 2013 at 8:41

Attachments:

GoogleCodeExporter commented 9 years ago
And we are able to run same setup on XP without the win32gui error. We are only 
getting it on windows 7

Original comment by wachk...@gmail.com on 1 Apr 2013 at 2:41

GoogleCodeExporter commented 9 years ago
This doesn't seem to be a problem in the framework itself but in environment 
configuration. For some reason the library you use doesn't find your win32gui 
module. One reason could be that you are running tests on Jython which doesn't 
support all same modules that Python (basically C-based modules are not 
supported).

Original comment by pekka.klarck on 23 Apr 2013 at 11:01

GoogleCodeExporter commented 9 years ago
Hi Pekka

I am getting the same problem while running robot framework on Windows 7. where 
as I am able to run successfully on Windows XP

Below are error details -
[ ERROR ] Invalid syntax in file 
'c:\python27\robot\sbps-main\implementation\resources\libraries\selenium2 
automation library.html' in table 'Settings': Importing test library 
'..\..\..\..\lib\selenium2library-1.2.0\Selenium2Library\' failed: ImportError: 
Import by filename is not supported.
PYTHONPATH: ['C:\\Python27\\lib\\site-packages\\robot\\libraries', 
'C:\\Python27', 'C:\\Python27\\Scripts\\ C:\\Python27\\Scripts', 
'C:\\Python27\\firefox', 'C:\\Python27\\ie', 'C:\\Python27\\DLLs', 
'C:\\Python27\\Lib', 'C:\\Python27\\Lib\\lib-tk', 
'C:\\Python27\\Scripts\\robot\\sbps-main\\execution\\lib', 
'C:\\Windows\\system32\\python27.zip', 'C:\\Python27\\lib\\plat-win', 
'C:\\Python27\\lib\\site-packages', 
'C:\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode', '.']
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\robot\utils\importing.py", line 88, in _import
    imported = __import__(modname, {}, {}, fromlist)
[ ERROR ] Invalid syntax in file 
'c:\python27\robot\sbps-main\implementation\resources\libraries\object 
repository library.html' in table 'Settings': Importing test library 
'ObjectRepositoryLibrary' failed: ImportError: No module named sbps
PYTHONPATH: [u'c:\\python27\\robot\\sbps-main\\execution\\lib', 
'C:\\Python27\\lib\\site-packages\\robot\\libraries', 'C:\\Python27', 
'C:\\Python27\\Scripts\\ C:\\Python27\\Scripts', 'C:\\Python27\\firefox', 
'C:\\Python27\\ie', 'C:\\Python27\\DLLs', 'C:\\Python27\\Lib', 
'C:\\Python27\\Lib\\lib-tk', 
'C:\\Python27\\Scripts\\robot\\sbps-main\\execution\\lib', 
'C:\\Windows\\system32\\python27.zip', 'C:\\Python27\\lib\\plat-win', 
'C:\\Python27\\lib\\site-packages', 
'C:\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode', '.']
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\robot\utils\importing.py", line 88, in _import
    imported = __import__(modname, {}, {}, fromlist)
  File "c:\python27\robot\sbps-main\execution\lib\ObjectRepositoryLibrary.py", line 1, in <module>
    from sbps import *

Original comment by smitapha...@gmail.com on 28 May 2013 at 11:37