Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Webdriver-图像中嵌入URL的Xpath_Java_Selenium Webdriver_Webdriver - Fatal编程技术网

Java Webdriver-图像中嵌入URL的Xpath

Java Webdriver-图像中嵌入URL的Xpath,java,selenium-webdriver,webdriver,Java,Selenium Webdriver,Webdriver,我想为员工功能自动上传个人资料图片。 但是,单击员工照片图像后会显示上载按钮,这是嵌入在图像中的URL <div id="profile-pic"> <h1>fg gh</h1> <div class="imageHolder"> <a href="/orangehrm-3.2.1/orangehrm-3.2.1/symfony/web/index.php/pim/viewPhotograph/empNumber/0065" cl

我想为员工功能自动上传个人资料图片。 但是,单击员工照片图像后会显示上载按钮,这是嵌入在图像中的URL

<div id="profile-pic">

<h1>fg gh</h1>
  <div class="imageHolder">

  <a href="/orangehrm-3.2.1/orangehrm-3.2.1/symfony/web/index.php/pim/viewPhotograph/empNumber/0065" class="tiptip">

    <img alt="Employee Photo" src="/orangehrm-3.2.1/orangehrm-3.2.1/symfony/web/index.php/pim/viewPhoto/empNumber/0065" border="0" id="empPic" width="200" height="200">
  </a>

  </div>    
</div>
以下是在employee链接中的位置是动态的代码段。 它附加了每个员工ID


你能帮我学习Xpath吗

如果您知道员工编号,您可以将其命名为//img[contains@src,'0065']else//div[@id='profile-pic']/img