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

Fault on enterstring('<') #38

Open
reginaldl opened this issue Mar 1, 2017 · 1 comment
Open

Fault on enterstring('<') #38

reginaldl opened this issue Mar 1, 2017 · 1 comment

Comments

@reginaldl
Copy link

Hi,

I'm getting an error when calling ldtp.enterstring(<window>, <field>, '<'):

>>> import ldtp
>>> ldtp.enterstring('frmUntitled - Notepad', 'txt0', '<')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files (x86)\VMware\CobraWinLDTP\ldtp\__init__.py", line 432, in enterstring
    return _remote_enterstring(window_name, object_name, data)
  File "C:\Program Files (x86)\VMware\CobraWinLDTP\ldtp\client.py", line 72, in __call__
    return self.__send(self.__name, args)
  File "C:\Python27\lib\xmlrpclib.py", line 1599, in __request
    verbose=self.__verbose
  File "C:\Program Files (x86)\VMware\CobraWinLDTP\ldtp\client.py", line 195, in request
    raise e
xmlrpclib.Fault: <Fault 0: 'Index was outside the bounds of the array.'>

Here are request_body and payload:

(Pdb) payload
'<?xml version="1.0"?>\r\n<methodResponse>\r\n  <fault>\r\n    <value>\r\n      <struct>\r\n        <member>\r\n          <name>faultCode</name>\r\n          <value>\r\n            <i4>0</i4>\r\n          </value>\r\n        </member>\r\n        <member>\r\n          <name>faultString</name>\r\n          <value>\r\n            <string>Index was outside the bounds of the array.</string>\r\n          </value>\r\n        </member>\r\n      </struct>\r\n    </value>\r\n  </fault>\r\n</methodResponse>'
(Pdb) request_body
"<?xml version='1.0'?>\n<methodCall>\n<methodName>enterstring</methodName>\n<params>\n<param>\n<value><string>frmUntitled - Notepad</string></value>\n</param>\n<param>\n<value><string>txt0</string></value>\n</param>\n<param>\n<value><string>&lt;</string></value>\n</param>\n</params>\n</methodCall>\n"
(Pdb) 

Is there a way to fix it or workaround it?

I've tried using settextvalue and inserttext, both have no effect but still return 1...

@codeNameMahi
Copy link

codeNameMahi commented Jul 20, 2017

I am seeing the same problem using the linux version of ldtp on Ubuntu 16.04:

(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'">

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