Re: Can anyone please help me with keyword driven framework using Python in TC
What you are asking is a lot more than just a few posts on a web forum. Building a framework that uses keywords and data passed in from an Excel spreadsheet and making it robust enough to be able to navigate a complex application takes work.
Couple of tips for you from my experience, though:
1) Try to find a balance between granularity and broad test methods. For example, you could go the extreme of having keywords like "CLICKBUTTON" or "ENTERTEXT" or "SELECTDROPDOWN" where you would just build a keyword test on general controls. But that would take a lot of effort in making sure that you do control detection, etc. But going to broad as "RUNTESTCASE2" is too broad and doesn't allow for flexibility. You should find some place in between that works for your particular skill set and the skills of the rest of your team
2) DDT is your friend. Since you want to use Excel, read the articles on DDT.ExcelDriver that are in the help documentation.
3) Switch statements are going to be your better bet... but the more keywords you have, the bigger the switch statement. It could get VERY large. That's why I ended up using something more like data reflection.
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.