How to debug your first UI Automation Test Sample
Another One! (DJ Khaled’s Voice). That’s RIIGGHHT; I am back! I wanted to do my first #HackMonday to follow up on my WinAppDriver (WAD) post. This a three-part blog. In part I of the blog, I will debug the Python calculator sample test. In part II of the blog, I will debug my own Python WordPad test.
Background info:
#HackMonday is an idea I came up with as a social experiment. The goal is to #hack with someone new, with the hopes of learning or teaching them something new. For this #HackMonday, I had the pleasure of virtually meeting Hammid Funsho (HI FWEND!)
About Hammid:
A little bit about Hammid, He is a software engineer. He has about 12 years of experience under his belt. He has a passion for automation testing. He codes Java, but occasionally dabbles in Python, and Ruby. Hammid is currently based out Raleigh North Carolina.
How did I come about meeting Hammid? Great question! It’s simple; I met Hammid on twitter. I saw his profile and liked his software creds, so I asked him if he would be interested in being part of my first #hackmonday. Thankfully, Hammid gracefully accepted my invitation to #hack.
Pre-Requisite:
2.Windows 10 machine
5. Patience
I started off by explaining WinAppDriver to Hammid since he wasn’t familiar with it. (For a recap, click here). Before we debugged my Python Wordpad UI test, I decided to show him WinAppDriver (WAD) in all its glory by running the Python Calculator Test for WAD. The calculator test was a functioning test and should have been an easy way to showcase WAD. To my surprise, the test failed. I must admit, I was taken back by the results since I ran this a couple of weeks ago. I knew for a fact I had not made any changes to the code since I downloaded it from GitHub. So with our best Tom Cruise impressions, Hammid and I went on mission impossible to figure out what went wrong. We started off by comparing the copy of the calculator test I had to the one on the WAD GitHub. We found no differences.
We checked the WAD logged, and we found no 400 errors either. We decided to go back to Visual Studio Code and look at the traceback in the Debug Console.
Here is a video of us debugging the calculator test.
While reviewing the traceback in the debug console, we kept seeing Assertion Error: ‘Display is 8’ != ‘Display is 8 ‘ which means “display is 8 is not equal to display is 8 ”.
Side note
At first glance, you may not notice anything wrong with the error messages. So we decided to use the print technique to understand what the CalculatorResults value should be.
def test_initialize(self):
self.driver.find_element_by_name("Clear").click()
self.driver.find_element_by_name("Seven").click()
result = self.driver.find_element_by_accessibility_id("CalculatorResults")
print (result.text)
self.assertEqual(str(result.text),"Display is 7 ")
We ran the code and saw that the CalculatorResults value is "Display is 7" but our code was still failing.However, if you look closer, there are some extra white spaces included in one of the “Display is 8”. This was odd since I had not made any changes to the calculator test. To further investigate the issue, we opened up the windows app called Inspect which enables you to view the UI element and see its attributes/ accessibility information.
Upon further inspection, we agreed that there were too many white spaces for "Display is 8" in the calculatortest.py test. So after checking Inspect and verifying this ourselves, we decided to remove the extra white spaces. We reran the test again and this time S-U-C-C-E-S-S.
Conclusion:
The sudden change in the element “calculatortest” I believe was due to a Windows update that I did on my machine the day prior. The calculator app must have updated, and the dev team must have removed the extra white spaces which in turn broke the calculatortest.py code. I learned a lesson. Your environment is always changing, and I find myself asking how could I improve this code so that if there are any additional updates, my code will not break. We could potentially use the strip method or the replace method in python. You can check out an article on how to strip characters from a string from the website below.
Thanks for the useful information of software testing courses, give more updates on software testing development, First time I visit your blog really nice, I bookmark your blog here after a daily visit. Learn software testing course in Chennai
ReplyDeleteI feel really happy to have seen your webpage and look forward to so many more entertaining times reading here.Thanks once more for all the details.
ReplyDeleteBest selenium training Institute in chennai
I feel extremely cheerful to have seen your web page and anticipate such a large number of additionally engaging circumstances perusing here.Thanks yet again for every one of the points of interest.
ReplyDeleteRead Beard Press
Yiioverflow presenting one of the best and high performance PHP framework. Fast, secure and extremely professionals are developing applications. We guide to implement mobile app development and SOA hybrid applications.Code in Nodejs, Angular,Ionic,ReactJS and Yiiframework.
ReplyDeleteGreat Article
DeleteCyber Security Projects for CSE Students
Project Centers in Chennai
JavaScript Training in Chennai
JavaScript Training in Chennai
Thanks for sharing the valuable information to share with us For more valuable information please visit our website.
ReplyDeleteselenium training in chennai
aws training in chennai
Excellent blog about Python. I learned a lot from your blog and I have bookmarked this page for my future reference. Keep up the good work and share more like this.
ReplyDeletePython Classes in Chennai | Python Training
Your posts are the flower of the flock. I apply the advice in real life. They contain pieces of advice. I'm grateful for your sharing. I hope you will write often and post more articles.
ReplyDeleteemail with love 2018 email with love 2018
Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information..
ReplyDeleteselenium training in bangalore
aws training in bangalore
The blog you have shared is very much helpful to know more about the selenium. Thanks for your information about the selenium.
ReplyDeleteselenium testing training
selenium testing course
selenium training classes
selenium classes
selenium training course
Thanks for your efforts in sharing the knowledge to needed ones. Waiting for more updates. Keep continuing.
ReplyDeleteIELTS Training Institute in T Nagar
IELTS Classes in KK Nagar
IELTS Classes in Chennai Ashok Nagar
IELTS Coaching near Porur
IELTS Training in Poonamallee
IELTS Coaching Center near me
IELTS in Ramapuram
This concept is a good way to enhance the knowledge.thanks for sharing. please keep it up selenium Online Training Hyderabad
ReplyDeleteThis concept is a good way to enhance the knowledge.thanks for sharing. please keep it up selenium Online Training Hyderabad
ReplyDeleteThis information very good.and more useful
ReplyDeleteDOT NET training in Marathahalli
dot net training institute in Marathahalli
dot net course in Marathahalli
best dot net training institute in Marathahalli
This dotnet concept was very nice
ReplyDeleteDOT NET training in bangalore
dot net training institute in bangalore
dot net course in bangalroe
best dot net training institute in bangalore
Nice Blog..
ReplyDeleteDOT NET training in btm
dot net training institute in btm
dot net course in btm
best dot net training institute in btm
You won't believe me, but I was planning to write a blog very similar to the one you have posted here. Great work!
ReplyDeletePython Training In Chennai
Selenium Training In Chennai
thanks for this excellent article
ReplyDeletepython Training in Bangalore | Python Training institute in Bangalore
Great job. It is useful for the fresher to gain knowledge on
ReplyDeletethe technology. Keep updating it.
software testing training institute
best software testing course
best institute for software testing
A very useful blog to every. Really it is easy to understand.
ReplyDeleteGreat job. Keep posting the updates.
selenium training
selenium course
selenium testing training
Thank you for sharing such a nice and interesting blog with us. Hope it might be much useful for us. keep on updating...!!
ReplyDeleteArticle submission sites
Guest posting sites
If you want to play like me and not lose, you should try playing BGAOC. free gambling with us Playing here you not only win but also get a lot of fun.
ReplyDeleteYour article is really worth reading. I've been follwing your blogs for a while and you are doing a great job. Regards to your hard work and great effort.
ReplyDeleteOracle Training in Chennai
Oracle Course in chennai
Tally Course in Chennai
Tally Classes in Chennai
Embedded System Course Chennai
Embedded Training in Chennai
Oracle Training in OMR
Oracle Training in Porur
I was searching an excellent blog in this topic, thanks admin for the info on latest technology.
ReplyDeleteGerman Classes in Chennai
Big Data Training in Chennai
Android Training in Chennai
Selenium Training in Chennai
Digital Marketing Training in Chennai
web designing course in chennai
web designing course in Tambaram
web development courses in chennai
Thank you for sharing this post.
ReplyDeleteArticle submission sites
Guest posting sites
Learned a lot from your post and it is really good. Share more tech updates regularly.
ReplyDeleteCloud Training in Chennai
Cloud Computing Courses in Chennai
AWS Training in Chennai
AWS Certification in Chennai
DevOps Training in Chennai
Machine Learning Training in Chennai
Machine Learning course in Chennai
AWS Training in Chennai
Such an excellent and interesting blog, do post like this more with more information, this was very useful, Thank you.
ReplyDeleteAviation Academy in Chennai
Air hostess training in Chennai
Airport management courses in Chennai
Ground staff training in Chennai
best aviation academy in Chennai
air hostess training academy in Chennai
diploma in airport management in Chennai
Ground staff training in Chennai
Sure, it’s possible… I've fulfilled after reading this blog. Good job.
ReplyDeleteAppium Training in Chennai
Appium Certification in Chennai
Appium Training
JMeter Training in Chennai
JMeter Certification
core java training in chennai
C C++ Training in Chennai
javascript training in chennai
It was good explanation and it looks more impressive!thank you for sharing precious information with us..
ReplyDeleteNode JS Training in Chennai
Node JS Course
IoT Courses
Ionic training course
Best Informatica Training in Chennai
IoT Training in Chennai
Xamarin Training in Chennai
I am very happy to visit your blog. This is definitely helpful to me, eagerly waiting for more updates.
ReplyDeleteAutomation Anywhere Training in Chennai
Automation Training in Chennai
Automation courses in Chennai
RPA Training in Chennai
Robotics Process Automation Training in Chennai
Blue Prism Training in Chennai
Blue Prism Training Chennai
RPA Training in Anna Nagar
This comment has been removed by the author.
ReplyDeleteFabulous post admin, it was too good and helpful. Waiting for more updates.
ReplyDeleteAngularJS Training in Chennai
AngularJS Training institute in Chennai
Angular 7 Training in Chennai
Angular 4 Training in Chennai
ccna Training in Chennai
ReactJS Training in Chennai
PHP Training in Chennai
Tally course in Chennai
ui ux design course in Chennai
AngularJS Training in Velachery
whatsapp groups
ReplyDelete1movies
ReplyDeletemobile whatsapp groups
ReplyDeleteThanks for sharing this wonderful and useful information...
ReplyDeleteAWS Training in Marathahalli
AWS Training in Bangalore
RPA Training in Kalyan Nagar
Data Science with Python Training Bangalore
AWS Training in Kalyan Nagar
RPA training in bellandur
AWS Training in bellandur
Marathahalli AWS Training Institues
Kalyan nagar AWS training in institutes
Data Science Training in bellandur
I feel satisfied to read your blog, you have been delivering a useful & unique information to our vision.keep blogging.
ReplyDeletesalesforce Training in Bangalore
uipath Training in Bangalore
blueprism Training in Bangalore
Good blog!!! It is more impressive... thanks for sharing with us...
ReplyDeleteSelenium Training in Chennai
Selenium Training
selenium classes in chennai
Selenium Course in Chennai
Selenium Training in Annanagar
Selenium training in vadapalani
Digital Marketing Course in Chennai
Python Training in Chennai
Big data training in chennai
JAVA Training in Chennai
Your post is just outstanding! thanx for such a post,its really going great and great work.
ReplyDeletepython training in kalyan nagar|python training in marathahalli
selenium training in marathahalli|selenium training in bangalore
devops training in kalyan nagar|devops training in bellandur
phthon training in bangalore
Good post!Thank you so much for sharing this lovely article.It was so good to read and useful to upgrade my understanding...
ReplyDeletesalesforce Training in Bangalore
uipath Training in Bangalore
blueprism Training in Bangalore
Wonderful Blog!!! Your post is very informative about the latest technology. Thank you for sharing the article with us.
ReplyDeleteaws Training in Bangalore
python Training in Bangalore
hadoop Training in Bangalore
angular js Training in Bangalore
bigdata analytics Training in Bangalore
A very nice post. Thanks for sharing such a piece of valuable information...
ReplyDeleteaws Training in Bangalore
python Training in Bangalore
hadoop Training in Bangalore
angular js Training in Bangalore
bigdata analytics Training in Bangalore
Good post!Thank you so much for sharing this lovely article.It was so good to read and useful to upgrade my understanding...
ReplyDeleteaws Training in Bangalore
python Training in Bangalore
hadoop Training in Bangalore
angular js Training in Bangalore
bigdata analytics Training in Bangalore
I have been reading for the past two days about your blogs and topics, still on fetching! Wondering about your words on each line was massively effective. Techno-based information has been fetched in each of your topics. Sure it will enhance and fill the queries of the public needs. Feeling so glad about your article. Thanks…!
ReplyDeletebest software testing training in chennai
best software testing training institute in chennai with placement
software testing training
courses
software testing training and placement
software testing training online
software testing class
software testing classes in chennai
best software testing courses in chennai
automation testing courses in chennai
This is the first & best article to make me satisfied by presenting good content. I feel so happy and delighted. Thank you so much for this article.
ReplyDeleteLearn Best Digital Marketing Course in Chennai
Digital Marketing Course Training with Placement in Chennai
Learn Digital Marketing Course Training in Chennai
Digital Marketing Training with Placement Institute in Chennai
Thanks for sharing an informative blog keep rocking bring more details.I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!
ReplyDeleteWeb Designing Training Institute in Chennai | web design training class in chennai | web designing course in chennai with placement
Mobile Application Development Courses in chennai
Data Science Training in Chennai | Data Science courses in Chennai
Professional packers and movers in chennai | PDY Packers | Household Goods Shifting
Web Designing Training Institute in Chennai | Web Designing courses in Chennai
Google ads services | Google Ads Management agency
Web Designing Course in Chennai | Web Designing Training in Chennai
Great Article. Thank you for sharing! Really an awesome post for every one.
ReplyDeleteProject Centers in Chennai
JavaScript Training in Chennai
Final Year Project Domains for IT
JavaScript Training in Chennai
I have been reading for the past two days about your blogs and topics, still on fetching! Wondering about your words on each line was massively effective.
ReplyDeletebest appium training in chennai
appium online training
appium training centres in chennai
appium training institutes in chennai
appium training institutes for appuim in chennai
appium training content
This blog is very helpful for us...I got some important information from this blog..
ReplyDeleteDOT NET Training in Chennai
DOT NET Training in Bangalore
asp .net training in chennai
dot net institute in bangalore
aws training in bangalore
Data Science Courses in Bangalore
DevOps Training in Bangalore
PHP Training in bangalore
spoken english classes in bangalore
dot net training in marathahalli
Great experience for me by reading this blog. Thank you for wonderful article.
ReplyDeleteAngularjs Training in Chennai
Angularjs Training in Bangalore
angularjs training institute in bangalore
Angular Training in hyderabad
best angularjs training in bangalore
angular training in bangalore
Salesforce Training in Bangalore
Hadoop training in bangalore
angular course in bangalore
angularjs training in marathahalli
Interesting blog. Got a lotb of information about this technology.
ReplyDeleteSpoken English Classes in Chennai
English Coaching Classes in Chennai
IELTS Training in Chennai
Japanese Language Course in Chennai
TOEFL Training in Chennai
French Language Classes in Chennai
content writing course in chennai
spanish courses in chennai
Spoken English Classes in Porur
Spoken English Classes in Adyar
I have been reading for the past two days about your blogs and topics, still on fetching! Wondering about your words on each line was massively effective.
ReplyDeletephp online training in chennai
php programming center in chennai
php class in chennnai
php certification course
php developer training institution chennai
php training in chennnai
php mysql course in chennai
php institute in chennnai
php course in chennnai
php training with placement in chennnai
php developer course
Nice post. Thanks for sharing! I want people to know just how good this information is in your article. It’s interesting content and Great work.
ReplyDeleteappium online training
appium training centres in chennai
best appium training institute in chennnai
apppium course
mobile appium in chennnai
mobile training in chennnai
appium training institute in chennnai
Great Article. Thank you for sharing! Really an awesome post for every one.
ReplyDeleteDigital Marketing Course In Kolkata
Web Design Course In Kolkata
ReplyDeleteThis content of information has
helped me a lot. It is very well explained and easy to understand.
seo training classes
seo training course
seo training institute in chennai
seo training institutes
seo courses in chennai
seo institutes in chennai
seo classes in chennai
seo training center in chennai
ReplyDeleteYou write this post very carefully I think, which is easily understandable to me. Not only this, but another post is also good. As a newbie, this info is really helpful for me. Thanks to you.
Tally ERP 9 Training
tally classes
Tally Training institute in Chennai
Tally course in Chennai
Great experience for me by reading this blog. Thank you for the wonderful article.
ReplyDeleteAngularjs course in Chennai
Angularjs Training in Bangalore
angular training in bangalore
Angular Training in hyderabad
angular course in bangalore
angularjs training in marathahalli
Web Designing Course in bangalore
python training in Bangalore
angularjs training institute in bangalore
best angularjs training in bangalore
You have shared an incredible content Blogs, it's really impressive...Thanks for all your works and keep posting
ReplyDeletepython training in chennai | python training in annanagar | python training in omr | python training in porur | python training in tambaram | python training in velachery
"It is actually a great and helpful piece of information. I am satisfied that you simply shared this helpful information with us. Please stay us informed like this. Thanks for sharing.
ReplyDeleteDigital Marketing Training Course in Chennai | Digital Marketing Training Course in Anna Nagar | Digital Marketing Training Course in OMR | Digital Marketing Training Course in Porur | Digital Marketing Training Course in Tambaram | Digital Marketing Training Course in Velachery
"
This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge. AWS Training in Bangalore I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.So join as Start You Career . nice page
ReplyDeleteAi & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai
Thanks for giving great kind of information. So useful and practical for me.
ReplyDeleteDigital Marketing Training Course in Chennai | Digital Marketing Training Course in Anna Nagar | Digital Marketing Training Course in OMR | Digital Marketing Training Course in Porur | Digital Marketing Training Course in Tambaram | Digital Marketing Training Course in Velachery
Awesome Post.Your information is really interesting. The content show cases your in-depth knowledge. Thanks for Sharing.
ReplyDeleteSelenium Training in chennai | Selenium Training in anna nagar | Selenium Training in omr | Selenium Training in porur | Selenium Training in tambaram | Selenium Training in velachery
I am really very happy to visit your blog. Now I am found which I actually want. I check your blog everyday and try to learn something from your blog. Thank you and waiting for your new post. data science course in aurangabad
ReplyDeleteLeading Application Development & Salesforce Consulting Company which provides Salesforce interview questions and answers
ReplyDeleteThe blog you shared is very good. I expect more information from you like this blog. Thank you.
ReplyDeletewhat is overloading
important libraries in python
substring function in python
data science linear regression in python
j2ee interview questions
python operator overloading
Great post! Thank you for sharing valuable information. Keep up the good work..
ReplyDeletesoftware testing training with placement
ReplyDeleteThanks for sharing a very useful article. Am sure it helped to clear the doubts I had. Keep posting more. Also dont forget to check out our pages too.
data science training in chennai
ccna training in chennai
iot training in chennai
cyber security training in chennai
ethical hacking training in chennai