嗨,这是我用来显示目录信息的代码。有没有办法让名为{{Email Address}}的部分显示为目录中的超链接?
<div class="aboutcontainer">
<div class="photocontainer">
<img src="{{Picture}}" width="100%">
</div>
<p class="aboutname">
<b>{{First Name}} {{Last Name}}</b>
</p>
<p class="department">{{Department}}</p>
<div class="infocontainer">
<div class="basicinfocontainer">
<b>Infos</b>
<p class="info">
<b>Country</b>: {{Country}} <br>
<b>Department</b>: {{Department}}<br>
<b>Position</b>: {{Position}}<br></p>
</div>
<div class="basicinfocontainer">
<b>Contact</b>
<p class="info">
<b>Email</b>: {{Email Address}}<br>
<b>Phone Number</b>: {{Phone Number}}<br></p>
</div>
</div>
</div>
答案 0 :(得分:1)
您可以通过替换
来创建超链接 element=driver.find_element_by_xpath(".//*[@data-ref='formWrap']/div[4]/div/div/div/input")
element.getAttribute("value")
与
<b>Email</b>: {{Email Address}}<br>