I am trying to loop through table elements on a page of our ERP system.
Based on a question I asked before I thought this would be a slam dunk - but I cannot figure it out.
Here's the latest code I've tried:
approved_suppliers = driver.find_elements_by_xpath("//tbody[@id='ApprovedSupplierBody']")
for supplier in approved_suppliers:
print('Supplier',supplier.id)
if I substitute print('Supplier',supplier.id)
with print('Supplier',supplier.value)
I get the following error:
AttributeError: 'WebElement' object has no attribute 'value'
In the screenshot example I want the code to print 300 Below
, and when there are multiple suppliers the names of the fields increase by 1.
For example, pik_Supplier_1
, pik_Supplier_2
, etc.
Thank you for helping me!