simple program can be created out of the created instance.
from ibm import Instance
instance = Instance(session='A')
print(instance.get_text(row=4, column=2, length=3))
# "IPL"
instance.wait(1)
# block execution for 1 second
instance.send_keys(key='[pf16]')
# above command send F16 key press and window get change
from ibm import Instance, Screen
instance = Instance("A")
screen = Screen(instance)
screen.describe("cursor", x=1, y=3)
screen.wait(5)
# wait up to 5 second for cursor to appear at (1, 3) location.
# As soon as cursor appears, it returns True else after time out returns False
text = Screen(instance)
text.describe(x=3, y=1, string="IPL", case=True)
text.wait(5)
# wait up to 5 second for IPL (case sensitive) appear at (3, 1) location.
# As soon as "IPL" appears, it returns True else after time out returns False

1282

被折叠的 条评论
为什么被折叠?



