Web Table - Selenium Automation with Python, Pycharm IDE

Publicado em: 22 Janeiro 2022
no canal de: 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)


Nesta página do site você pode assistir ao vídeo on-line Web Table - Selenium Automation with Python, Pycharm IDE duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Trikam Patel 22 Janeiro 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 30 vezes e gostou 1 espectadores. Boa visualização!