Forum Discussion
baxatob
8 years agoCommunity Hero
As far as I know, descriptive coding is just a kind of interacting with application objects without calling them from the object repository.
This can be implemented in different ways. For example:
app = Sys.Process("calc") #Windows calculator
class Button: def __init__(self, caption): self.button = app.Find(['WndClass', 'WndCaption'],
['Button', caption], 10) def click(self): self.button.Click() class Keypad: def __init__(self): self.btn0 = Button(0) self.btn1 = Button(1) self.btn2 = Button(2) self.btn3 = Button(3) self.btn4 = Button(4) self.btn5 = Button(5) self.btn6 = Button(6) self.btn7 = Button(7) self.btn8 = Button(8) self.btn9 = Button(9) def test(): keypad = Keypad() keypad.btn5.click() keypad.btn7.click() keypad.btn0.click()
Related Content
- 5 months ago
- 14 years ago
Recent Discussions
- 4 days ago
- 4 days ago
- 8 days ago