Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote Server and pageobject : Returning pageobject be recasted/remapped to one of the supported datatypes of remote library #13

Open
rama-nu3 opened this issue Feb 25, 2015 · 3 comments

Comments

@rama-nu3
Copy link

To run the script, based on robotframework-pageobject, on a remote (xmlrpc based) server, the returned pageobject needs to be "recasted/remapped" to string.

The supported arguments and return value types in remote server/client setup is as in manual are
http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.html?r=2.8.5

- Strings, numbers and Boolean values are passed without modifications.
- Python None is converted to an empty string.
- All lists, tuples, and other iterable objects (except strings and dictionaries) are passed as lists so that their contents are converted recursively.
- Dictionaries and other mappings are passed as dicts so that their keys are converted to strings and values converted to supported types recursively.
- Strings containing bytes in the ASCII range that cannot be represented in XML (e.g. the null byte) are sent as Binary objects that internally use XML-RPC base64 data type. Received Binary objects are automatically converted to byte strings.
- Other types are converted to strings.

Logs from remote client:

20150225 15:54:52.849 - FAIL - <type 'exceptions.TypeError'>:dictionary key must be string
20150225 15:54:52.849 - DEBUG - Traceback (most recent call last):
File "C:\Users\Rama\Anaconda\lib\site-packages\robot\libraries\Remote.py", line 85, in run_keyword
result = RemoteResult(self._client.run_keyword(name, args, kwargs))
File "C:\Users\Rama\Anaconda\lib\site-packages\robot\libraries\Remote.py", line 221, in run_keyword
raise RuntimeError(message)

The discussion on the issue is as in the link:
https://groups.google.com/forum/#!topic/robotframework-users/WG3pcoRfkuI

Improvement request:
I would request if there is an option available in robotframework-pageobject library to automatically recast the returned pageobject to string.

@rama-nu3 rama-nu3 changed the title Remote Server and pageobject : Returning pageobject as recast/remap to one of the supported datatypes Remote Server and pageobject : Returning pageobject be recasted/remapped to one of the supported datatypes of remote client Feb 25, 2015
@rama-nu3 rama-nu3 changed the title Remote Server and pageobject : Returning pageobject be recasted/remapped to one of the supported datatypes of remote client Remote Server and pageobject : Returning pageobject be recasted/remapped to one of the supported datatypes of remote library Feb 25, 2015
@hellmanj
Copy link
Contributor

@rama-nu3, it may be awhile before any of the core contributors can do something about this. If you have the time to investigate further and submit a pull request, we'd be more than happy to accept it.

@rama-nu3
Copy link
Author

Thank you, sure. I will provide my feedback as and when I find more. I will try to fix in the process

@kahunacohen
Copy link

Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants