Skip to content
Advertisement

How to display HTML Table data cell elements in Tkinter GUI using Selenium?

I want to make a program that takes the table data cell elements of tables from a wholesale website (the tables show stock of disposable vapes), and then will display which items are low on stock on a Tkinter GUI. So far I am using selenium to go to different URLs of various vapes and print out the stock of certain flavors of those vapes depending on if they are below a certain number. I’ve added a Tkinter GUI which asks what stock you would like to check and launches selenium when you press on the ‘Vapes’ button. Would it be possible to display the HTML data on the Tkinter GUI itself, instead of just printing it to Terminal? Here is my code so far, I plan on adding more vapes and other items but only did two here so it doesn’t look as messy:

JavaScript

Sorry if this question is confusing I’m fairly new to programming. Thanks guys.

Advertisement

Answer

You could try using a Treeview.

I’ve added one in the code below, it’s a bit rough though.:)

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement