Hi everyone, as u can see in the image above, i need to scrap the data in WAN INFORMATION. in order to do that i must click ipv4 table first, then the wan information description will appear.
this is the HTML coding :
this is the coding that i did to locate element by id.
MainTab=browser.find_element_by_name('mainli_waninfo').click()#1st tab
SubTab=browser.find_element_by_name('subli_waninfo').click()#2nd tab
desc = browser.find_element_by_id('tabal_01')#info Description
desc.click()
browser.switch_to.frame(browser.find_element_by_id('frameContent'))
element = wait.until(EC.element_to_be_clickable(browser.find_element_by_id('divTableipv4InformationForm')))
element.click()
time.sleep(1)
html=browser.page_source
soup=bs(html,'lxml')
#print(soup.prettify())
This is the parameter that i need to scrap.
w2List=['MAC Address','VLAN','Policy','Priority','NAT','IP Acquisition Mode','IP Address/Subnet Mask','Gateway','DNS Servers','Lease Time','Remain Lease','NTP Servers','Time Zone Info','SIP Servers','Static Route','Vendor Info','Online Duration (dd:hh:mm:ss)']
w2_id=['MacAddress','Vlan','PriorityPolicy','Priority','NatSwitch','IPAddressMode','IpAdress','GateWay','DnsServer','LeaseTime','LeaseTimeRemaining','NtpServer','STime','SipServer','StaticRoute','VenderInfo','V4UpTime']
for i in range(len(w2_id)):
elemntValu =desc.find_element_by_id(w2_id[i]).text
print(w2List[i] + " : "+ elemntValu)
browser.close()
this is html code for WAN INFORMATION TABLE
введите описание изображения здесь
но я получил эту ошибку
NoSuchElementException: сообщение: невозможно найти элемент: [id = "tabal_01"]
может кто-нибудь Помоги мне? я действительно очень ценю это