Rewrote combobox handler

Rewrote combobox handler, as the expand doesn't work as expected. Verified with VMW bug#966693
>>> comboselect('Virtual Machine Settings', 'cboMaximumresolutionofanyonemonitor', '1600 x 1200')
1
>>> comboselect('Virtual Machine Settings', 'cboMaximumresolutionofanyonemonitor', '2560 x 1600')
1
>>> verifyselect('Virtual Machine Settings', 'cboMaximumresolutionofanyonemonitor', '2560*')
1
>>> verifyselect('Virtual Machine Settings', 'cboMaximumresolutionofanyonemonitor', '1600*')
0
>>> showlist('Virtual Machine Settings', 'cboMaximumresolutionofanyonemonitor')
1
>>> hidelist('Virtual Machine Settings', 'cboMaximumresolutionofanyonemonitor')
1
>>> getallitem('Virtual Machine Settings', 'cboMaximumresolutionofanyonemonitor')
['1600 x 1200', '2560 x 1600', '1280 x 1200', '640 x 480', '800 x 600', '1024 x 768', '1280 x 1024']

QA Notes:
Testing Done: VMware Workstation Settings
Documentation Notes:
Bug Number: 966693
Reviewed by:
Approved by:
Mailto:
Added getcombovalue API

Added getcombovalue API
>>> getcombovalue('Virtual Machine Settings', 'cboMaximumresolutionofanyonemonitor')
'2560 x 1600'
>>> getcombovalue('Virtual Machine Settings', 'cboMaximumresolutionofanyonemonitor')
'1280 x 1024'

QA Notes:
Testing Done: Windows 7 with VMware Workstation vm settings
Documentation Notes:
Bug Number: 964735
Reviewed by:
Approved by:
Mailto:
Manipulate object name based on component type index

Manipulate object name based on component type index
* Get object property / info based on component type
* Do action / verification based on component type
>>> getobjectproperty('Page Setup', 'btn#4', 'label')
'Close'
>>> getobjectproperty('Page Setup', 'btn#3', 'label')
'Cancel'
>>> getobjectproperty('Page Setup', 'btn#2', 'label')
'OK'
>>> getobjectproperty('Page Setup', 'btn#1', 'label')
'Open'
>>> getobjectproperty('Page Setup', 'btn#0', 'label')
'Open'
>>> click('Page Setup', 'btn#0')
1
>>> click('Page Setup', 'btn#1')
1
>>> click('Page Setup', 'btn#3')
1
>>>

QA Notes: Combatible with Linux implementation
Testing Done: With Page Setup window in Notepad on Windows 7
Documentation Notes:
Bug Number:
Reviewed by:
Approved by:
Mailto:
Based on fix by John

fix \r\n issue

QA Notes:
Testing Done:
Documentation Notes:
Bug Number:
Reviewed by:
Approved by:
Mailto:
Revert "Based on fix by John"

This reverts commit 7fb14b9ad9271f6fa8a6d3ab4e12a79bd53ab5e4.
Added getaccesskey API

Added getaccesskey API

>>> getaccesskey('Print', 'All')
'Alt+l'
>>> getaccesskey('Print', 'btnCancel')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files (x86)\VMware\CobraWinLDTP\ldtp\client.py", line 66, in __call__
    return self.__send(self.__name, args)
  File "C:\Python27\lib\xmlrpclib.py", line 1570, in __request
    verbose=self.__verbose
  File "C:\Program Files (x86)\VMware\CobraWinLDTP\ldtp\client.py", line 185, in request
    raise LdtpExecutionError(e.faultString.encode('utf-8'))
ldtp.client_exception.LdtpExecutionError: No access key associated
>>>

QA Notes: VMW bug#964755
Testing Done: With Notepad Print dialog on Windows 7 SP1
Documentation Notes:
Bug Number: 964755
Reviewed by:
Approved by:
Mailto:
Check for Subtree rather than Children

Check for Subtree rather than Children, with this we get the result of existing window, that were children of frame/main window

QA Notes:
Testing Done: VMware Workstation VM Settings->Network->Lan Segments
Documentation Notes:
Bug Number:
Reviewed by:
Approved by:
Mailto:
Check for Subtree rather than Children

Check for Subtree rather than Children, with this we get the result of existing window, that were children of frame/main window
With existing logic "Global LAN Segments" window is not recognized, as its children of VM Settings window and which is children of Workstation main window (frame)

Before this fix (If VM Settings was already opened):
>>> guiexist('Virtual Machine Settings')
0
After this fix (If VM Settings was already opened):
>>> guiexist('Virtual Machine Settings')
1

Before the fix (Global LAN Segments was already opened and it won't be recognized as its 3rd level window from primary window):
>>> guiexist('Global LAN Segments')
0
After the fix:
>>> guiexist('Global LAN Segments')
1

QA Notes:
Testing Done: VMware Workstation VM Settings->Network->Lan Segments
Documentation Notes:
Bug Number:
Reviewed by:
Approved by:
Mailto:
Improved performance, as with previous check-in degrated the performance and more execution time

Check for Subtree rather than Children, with this we get the result of existing window, that were children of frame/main window
With existing logic "Global LAN Segments" window is not recognized, as its children of VM Settings window and which is children of Workstation main window (frame)

Before this fix (If VM Settings was already opened):
>>> guiexist('Virtual Machine Settings')
0
After this fix (If VM Settings was already opened):
>>> guiexist('Virtual Machine Settings')
1

Before the fix (Global LAN Segments was already opened and it won't be recognized as its 3rd level window from primary window):
>>> guiexist('Global LAN Segments')
0
After the fix:
>>> guiexist('Global LAN Segments')
1

QA Notes: Improved performance, as with previous check-in degrated the performance and more execution time
Testing Done: VMware Workstation VM Settings->Network->Lan Segments
Documentation Notes:
Bug Number:
Reviewed by:
Approved by:
Mailto:
Add primary window and subwindow handle to the list on getwindowlist call

Add primary window and subwindow handle to the list on getwindowlist call

QA Notes:
Testing Done: VMware Player main menu invocation
Documentation Notes:
Bug Number:
Reviewed by:
Approved by:
Mailto:
Add primary window to the list in dynamic search

Add primary window to the list in dynamic search, if the handle doesn't exist in main window list
Wait 1 second before retrying windows search

wait(5);enterstring('<alt>p');getobjectlist('mnuContext')

QA Notes:
Testing Done: VMware Player main menu invocation
Documentation Notes:
Bug Number:
Reviewed by:
Approved by:
Mailto:
Changed window retry as 3 times

Changed window retry as 3 times, this will improve the wait duration

Compared to new changes (recent fixes) [1] I see some improvement (with my today's fix) [2], but not equivalent to earlier cobra version [3]. In my test run [2], BAT2 and 3 with # 1 and 2 in the result set are with retry as 3 and # 3 and 4 are with retry as 2. Based on this, I'm leaving the code with 3 retries. Note: I have removed delay of 1 second between each retry.

[1] - http://racetrack-dev.eng.vmware.com/result.php?id=345238
[2] - http://racetrack-dev.eng.vmware.com/result.php?id=345393
[3] - http://racetrack.eng.vmware.com/result.php?id=963433

QA Notes:
Testing Done: VMware Workstation BATS
Documentation Notes:
Bug Number:
Reviewed by:
Approved by:
Mailto:
Added new API appundertest

Added new API appundertest

QA Notes:
Testing Done: VMware Workstation
Documentation Notes:
Bug Number:
Reviewed by:
Approved by:
Mailto:
Check for app under test

Check for app under test
For wait till gui not exist, if window doesn't exist, don't look further for window handle
Look all application on alternate window lookup, if app under test exist

QA Notes:
Testing Done: VMware Workstation
Documentation Notes:
Bug Number:
Reviewed by:
Approved by:
Mailto:
Added additional comments

Added additional comments

QA Notes:
Testing Done:
Documentation Notes:
Bug Number:
Reviewed by:
Approved by:
Mailto:
Added appundertest API

Added appundertest API in Java and C# client

QA Notes:
Testing Done:
Documentation Notes:
Bug Number:
Reviewed by:
Approved by:
Mailto:
Merge pull request #5 from ldtp/master

Latest update