# 寻找文本所在的标签waitClickCompanyName = driver.find_elements_by_xpath('//div[@id="nsrzt"]//li') for i in waitClickCompanyName: #找出标签中的文本内容 name = i.get_attribute('textContent') #打印出获取到的文本 print(name)…
function selectText(element) { var text = document.getElementById(element); if (document.body.createTextRange) { var range = document.body.createTextRange(); range.moveToElementText(text); range.select(); } else if (window.getSelection) { var selecti…