Web Table - Selenium Automation with Python, Pycharm IDE

Published: 22 January 2022
on channel: Trikam Patel
30
1

Web Table - Selenium Automation with Python, Pycharm IDE
Click See More for the code:
Code Starts Here - - - - - - - - - - - - - - - - - - - - *- - - - - - - - - - - - - - - -

from selenium import webdriver
from selenium.webdriver.common.by import By
import time

driver = webdriver.Chrome(executable_path="C:/Program Files (x86)/Google/Chrome/Application/chromedriver.exe")

driver.get("G:\\trikam\\table.html")

rows=len(driver.find_elements_by_xpath("/html/body/table/tbody/tr"))
cols=len(driver.find_elements_by_xpath("/html/body/table/tbody/tr[1]/td"))

print(rows)
print(cols)

print("Product"+" "+"Article"+" "+"Price")

for r in range(2,rows+1):
for c in range(1,cols+1):
value=driver.find_element_by_xpath("/html/body/table/tbody/tr["+str(r)+"]/td["+str(c)+"]").text
print(value,end=' ')
print(2)


On this page of the site you can watch the video online Web Table - Selenium Automation with Python, Pycharm IDE with a duration of hours minute second in good quality, which was uploaded by the user Trikam Patel 22 January 2022, share the link with friends and acquaintances, this video has already been watched 30 times on youtube and it was liked by 1 viewers. Enjoy your viewing!