rpa_browser_getAllTabUrls
返回所有网页的Url地址
1. 函数
rpa_browser_getAllTabUrls()
2. 返回值
返回所有网页的Url地址,元组类型。该函数不会失败。
3. 示例
# 打开多个网页
urls = ['www.jd.com', 'www.baidu.com', 'www.sina.com']
for url in urls:
rpa_browser_openUrl(url)
# 获取网页Url地址
tabId = rpa_browser_getTabIdByUrl('jd.com')
url = rpa_browser_getWebUrl(tabId)
print(url)
# 获取网页文本
tabId1 = rpa_browser_getTabIdByUrl('baidu.com')
text = rpa_browser_getWebText(tabId1)
print(text)
# 获取网页源代码
html = rpa_browser_getWebSource(tabId1)
print(html)
# 获取网页所有标题
titles = rpa_browser_getAllTabTitles()
print(titles)
# 获取网页所有url
urls = rpa_browser_getAllTabUrls()
print(urls)