Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Can anybody help me about how to use these two functions to get value of any CSS property.
<img>如果有如下特定标签
<img>
<img title="Title" alt="myTitle" src="A/B/C/xyz.png">
driver.getElement(By.tagName("img")).getAttribute("src")将为您src提供此标签的属性。结果 -A/B/C/xyz.png
driver.getElement(By.tagName("img")).getAttribute("src")
src
A/B/C/xyz.png
同样,您可以获取诸如 等属性的title值alt。
title
alt
同样,您可以通过使用获取任何标签的 CSS 属性getCssValue("some propety")
getCssValue("some propety")
我正在尝试调用我的自定义 api,它使用回形针上传文件,它在本地使用https://github.com/jwagener/httmultiparty可以正常工作,但是当我尝试调用 api 并为 heroku 部署的应用程序上传