Test complete Desktop Application Python - Not able to append elements to a list
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2022
03:41 AM
09-06-2022
03:41 AM
Test complete Desktop Application Python - Not able to append elements to a list
Hi Team,
I'm using test complete for desktop automation using python programming language. Suppose, just say there is a elements which needed to be added into list.
When i try append elements into a list and then try to print it.It is returning empty.
#sample code
def main():
list = []
element = "apple"
list.append(element)
print(list)
Expected Output:
['apple']
Actual Output:
empty
Note:
Same is the case when on using insert,append,add
Solved! Go to Solution.
Labels:
- Labels:
-
Desktop Testing
-
Script Tests
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2022
03:53 AM
09-06-2022
03:53 AM
See Python - Specifics of Usage
Code
def main():
list = []
element = "apple"
list.append(element)
Log.Message(list[0])
