Ask a Question

descriptive programming with Python

JackSparrow
Frequent Contributor

descriptive programming with Python

Hi All ,

 

  • Am new to test complete till now because of your little push i learned so many things in test complete, now its time to take next step.
  • How to write a descriptive programming in test complete with python, actually i know how to do with VB scripting but i want to know how we do in python.
  • It will be great if any one just show/explain me an example for a desktop application.
2 REPLIES 2
tristaanogre
Esteemed Contributor

As I understand it, Descriptive Programming is a QTP/UFT concept that TestComplete parallels in it's use of Aliases, NameMapping, FindChild, etc.  I'm not sure that there is an exact 1 to 1 method to do what QTP/UFT does in descriptive programming.

 

 


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
baxatob
Community 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()

 

cancel
Showing results for 
Search instead for 
Did you mean: