0
我在網站裏的標籤和我不能改變標籤,使用XPath已經嘗試過,目前看起來是這樣的:改變與硒的webdriver標籤在Firefox
Select objSelect = new Select(objdriver.findElement(By.xpath("//*[@id='navigation']/li[2]/a")));
WebElement navigation = objdriver.findElement(By.xpath("//*[@id='navigation']/li[2]/a"));
HTML代碼:
<div>
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<div>
<div class="pull-right padding-top">
<a href="http://www.mineotaur.org>">
</div>
<ul id="navigation" class="nav navbar-nav">
<li class="active">
<a data-toggle="tab" href="#genewise">Gene-wise scatterplot</a>
</li>
<li>
<a data-toggle="tab" href="#groupwiseDistributionForm">Gene-wise distribution</a>
</li>
<li>
<a data-toggle="tab" href="#cellwise">Cell-wise scatterplot</a>
</li>
<li>
<a data-toggle="tab" href="#cellwiseDistribution">Cell-wise distribution</a>
</li>
<li id="toolNav" class="disabled">
<a data-toggle="tab" href="#tools">Tools</a>
</li>
感謝您的回答!
分享'HTML'代碼樣本相同,異常日誌 – Andersson