Web Table - Selenium Automation with Python, Pycharm IDE

Publié le: 22 janvier 2022
sur la chaîne: 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)


Sur cette page du site, vous pouvez voir la vidéo en ligne Web Table - Selenium Automation with Python, Pycharm IDE durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Trikam Patel 22 janvier 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 30 fois et il a aimé 1 téléspectateurs. Bon visionnage!