How to get data off from a web page in selenium webdriver

对着背影说爱祢 提交于 2019-11-29 18:15:36
Yu Zhang

What have you tried to fetch data from those links? I can show you an example. If you want to get "S.S.D Middle East - F.Z.E", after you click on its link, it has a number of attributes ranging from Company name to Industry. If you want to locate and retrieve its company name, you need to locate it first and get its text:

companyNameElement = browser.find_element_by_css_selector("div[class="region region-content"] span[itemprop="name"]");
companyName = companyNameElement.getText()

You should get "S.S.D Middle East - F.Z.E" in this companyName variable.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!