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

enterstring method does not work with "<" character #41

Open
codeNameMahi opened this issue Jul 20, 2017 · 1 comment
Open

enterstring method does not work with "<" character #41

codeNameMahi opened this issue Jul 20, 2017 · 1 comment

Comments

@codeNameMahi
Copy link

I am unable to input the "<" character using the enterstring method:

>>> ldtp.enterstring("frmWindow", "txtField", ">")
1

>>> ldtp.enterstring("frmWindow", "txtField", "<")
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/ldtp/client.py", line 70, in __call__ return self.__send(self.__name, args) File "/usr/lib/python2.7/xmlrpclib.py", line 1602, in __request verbose=self.__verbose File "/usr/lib/python2.7/dist-packages/ldtp/client.py", line 187, in request raise e xmlrpclib.Fault: <Fault 8002: 'string index out of range'>

(all special characters minus "<")
>>> ldtp.enterstring("frmWindow", "txtField", "~!@#$%^&*()_+=-,./?[]{}|")
1

(now including "<")
>>> ldtp.enterstring("frmWindow", "txtField", "~!@#$%^&*()_+=-,./?[]{}|<>")
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/ldtp/client.py", line 70, in __call__ return self.__send(self.__name, args) File "/usr/lib/python2.7/xmlrpclib.py", line 1602, in __request verbose=self.__verbose File "/usr/lib/python2.7/dist-packages/ldtp/client.py", line 187, in request raise e xmlrpclib.Fault: <Fault 8002: "'KeyComboAction' object has no attribute '_func'">

@stuaxo
Copy link
Contributor

stuaxo commented Jan 22, 2019

Bit of a guess. but since this is using XMLRPC underneath it could be worth experimenting with things that might work in XML ?

&lt;
&#60;

Or construct it using CDATA
<![CDATA[<]]>

(Though some of these might get eaten by the special character code)

https://www.dvteclipse.com/documentation/svlinter/How_to_use_special_characters_in_XML.3F.html

You can use a CDATA section to avoid content being parsed by the parser.
https://stackoverflow.com/a/16958735/62709

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

2 participants