Closed aaltat closed 8 years ago
is server.login_page.login.Login a module, or is "Login" a class in the "login" module? In other words, does the file \path\to\libs\server\login_page\login\Login.py exist?
On Wed, Jun 15, 2016 at 8:52 AM, Tatu Aalto notifications@github.com wrote:
When I start rfhub like this: python -m rfhub --pythonpath C:\path\to\libs --module server.login_page.login.Login. Then I get error: unable to import 'server.login_page.login.Login' : No module named Login
The --pythonpath C:\path\to\libs is same as in my pybot startup script and server.login_page.login.Login is in the same way is I import the library in Robot data. I do not understand why the rfhub is not able to parse the library.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/boakley/robotframework-hub/issues/66, or mute the thread https://github.com/notifications/unsubscribe/ABEmYmy1HQDSOHoNRaUjBX_nyb9TdsJuks5qMAOCgaJpZM4I2YPT .
I am home but I am pretty sure that Login is a class in the login.py file.
Would solving the problem be easier if there would be an example?
The --module argument, as the name implies, requires a module rather than a class. Try it with '--module server.login_page.login'. It should then find all classes in that module.
On Wed, Jun 15, 2016 at 10:13 AM, Tatu Aalto notifications@github.com wrote:
I am home but I am pretty sure that Login is a class in the login.py file.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/boakley/robotframework-hub/issues/66#issuecomment-226218847, or mute the thread https://github.com/notifications/unsubscribe/ABEmYioVvr9a4avl-mL3NiihmbaSBQbRks5qMBaOgaJpZM4I2YPT .
And if the module contains many classes but it should find only a one class, the Login. Then I should give the command like: python -m rfhub --pythonpath C:\path\to\libs --module server.login_page.login Login
No, --module means "find all the classes in this module". It's primarily designed for a module that defines page objects, or a module that defines several collections of keywords.
If you want only a specific class, use "--library server.login_page.login.Login".
On Wed, Jun 15, 2016 at 11:07 AM, Tatu Aalto notifications@github.com wrote:
And if the module contains many classes but it should find only a one class, the Login. Then I should give the command like: python -m rfhub --pythonpath C:\path\to\libs --module server.login_page.login Login
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/boakley/robotframework-hub/issues/66#issuecomment-226236682, or mute the thread https://github.com/notifications/unsubscribe/ABEmYkWrGKljMGtefTZKHO4QWxvrHafkks5qMCNUgaJpZM4I2YPT .
Ah ok, thanks for info
Tried and works like a charm. Thanks from input.
Thanks for using the hub! I hope you're finding it helpful. I wish I had more time to make it better :-\
On Thu, Jun 16, 2016 at 8:42 AM, Tatu Aalto notifications@github.com wrote:
Tried and works like a charm. Thanks from input.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/boakley/robotframework-hub/issues/66#issuecomment-226488371, or mute the thread https://github.com/notifications/unsubscribe/ABEmYpbIl83b87waqE4DJvogG1Y59hy5ks5qMVK-gaJpZM4I2YPT .
It is really useful, it makes finding the keywords so easy. Keep up the good work.
When I start rfhub like this:
python -m rfhub --pythonpath C:\path\to\libs --module server.login_page.login.Login
. Then I get error:unable to import 'server.login_page.login.Login' : No module named Login
The
--pythonpath C:\path\to\libs
is same as in my pybot startup script andserver.login_page.login.Login
is in the same way is I import the library in Robot data. I do not understand why the rfhub is not able to parse the library.