[TechCorner Challenge #6] - Compare HTML table with Excel file and correct data in Excel file
Hi TestComplete Community!
Welcome to our weekly challenge where anyone can put their tool knowledge to the test! By completing the task, you will practice your TestComplete skills, learn new things about working with the product, and get into the TechCorner Leaderboard!
Check out this week’s task:
Since working with HTML tables and Excel files is quite common when working with TestComplete, here’s one more task connected to this topic.
Task: Create a script to compare an HTML table with an Excel file and correct the data in the Excel file.
So, when the script encounters an HTML table cell, the value of which is different from the value of the corresponding Excel table cell, the Excel cell value should be changed to what’s actually shown in the table.
1. Parse the Orders table. 2. Save the table to the variable. 3. Working with Microsoft Excel Files - here you can choose the right way to extract data from the Excel file (TestComplete 14.50 users, check out the new Excel support - it does not require Excel to be installed on your machine). 4. Using a loop in the script, compare the table variable and Excel content cell-by-cell. 5. If the value in the Excel cell is different from the HTML table cell, it should be replaced with what’s shown in the table.
P.S. You can find the TechCorner Leaderboard and the rules of how to participate in the TechCorner Challenge by this link.
Sonya Mihaljova Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Re: [TechCorner Challenge #6] - Compare HTML table with Excel file and correct data in Excel file
*cracks knuckles* OK... I've been itching for a challenge. Stay tuned...
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.