English 中文(简体)
页: 1
原标题:Selenium - How to click an image on the below scenario
  • 时间:2011-11-09 12:57:42
  •  标签:
  • selenium

有一个有电网的桌子,希望用一个名称选择电网,单单删除其正文9。 请注意,所有电网都有相同的缩影9码,因此可以直线。 下面是守则。 请让我知道,如何绘制ic9代码的序号:id=“700>48283<-1$3”和div id=“containerChloride”

<table class="x-grid3-row-table" cellspacing="0" cellpadding="0" border="0" style="width: 760px;">
<tbody>
<tr>
<td class="x-grid3-col x-grid3-cell x-grid3-td-testKey x-grid3-cell-first " tabindex="0" style="width: 98px; display: none;">
</td>
<td class="x-grid3-col x-grid3-cell x-grid3-td-testId " tabindex="0" style="width: 98px; display: none;">
</td>
<td class="x-grid3-col x-grid3-cell x-grid3-td-orderableYN " tabindex="0" style="width: 98px; display: none;">
</td>
<td class="x-grid3-col x-grid3-cell x-grid3-td-cmpAOETestIds " tabindex="0" style="width: 98px; display: none;">
</td>
<td class="x-grid3-col x-grid3-cell x-grid3-td-accessionTypeValue " tabindex="0" style="width: 98px; display: none;">
</td>
<td class="x-grid3-col x-grid3-cell x-grid3-td-collectedTime " tabindex="0" style="width: 98px; display: none;">
</td>
<td class="x-grid3-col x-grid3-cell x-grid3-td-testName " tabindex="0" style="width: 198px;">
<div class="x-grid3-cell-inner x-grid3-col-testName" unselectable="on">
<div id="containerChloride" onmouseout="hideImage( img42 )" name="Chloride" onmouseover="showImage( img42 )">
<span id="testHoverSpan" class="testWithImg" height="100%" width="100%" onmouseout="hideImage( img42 )" style="position: relative; white-space: normal;">
Chloride
<img id="img42" onclick="removeTest("2A1");" onmouseout="hideImage( img42 )" src="resources/images/button_delete.gif" style="visibility: hidden;">
</span>
<img height="15" width="16" alt="View" onclick="testDescription(1414);" style="cursor: pointer; padding-right: 5px;" src="resources/images/icon_view_handling_instructions.gif">
</div>
</div>
</td>
<td class="x-grid3-col x-grid3-cell x-grid3-td-7 x-grid3-dirty-cell" tabindex="0" style="width: 178px;">
<div class="x-grid3-cell-inner x-grid3-col-7" unselectable="on">
<span id="700>48283<-1$3Container">
<span id="700>48283<-1$3">
700&nbsp;
<a onclick="removeIcd9Code( 700>48283<-1$3 , 2A1 , 48283 )" href="#">
</a>
</span>
</span>
</div>
</td>
问题回答

Here is the xpath you can use to identify the link: //*[@id="containerChloride"]//a





相关问题
Javascript communication with Selenium (RC)

My Application has a lot of calculation being done in JavaScript according to how and when the user acts on the application. The project prints out valuable information (through console calls) as to ...

Running automated Web browser tests under Hudson

I m running Hudson for my automated builds and love it. I d now like to create automated Web browser tests using either WaTiN (preferred) or Selenium. As my Hudson runs as a Windows service (under ...

Using a Java library with Scala reserved words

I m using an external library written in Java (Selenium). One of the function calls has the signature type(String, String), and I keep getting compiler errors when trying to call it from Scala, that ...

Heightened privilege selenium browsers on Windows 7 (x64)

I make use of *firefox and *iexplore etc. within my selenium tests to get around the issue of self-signed SSL certificates on my local machine. Unfortunately, now that I ve moved from XP over to 7, ...

Selenium not working with Firefox 3.x on linux

I am using selenium-server , selenium rc for UI testing in my application . My dev box is Windows with FireFox 3.5 and every thing is running fine and cool. But when i try to run selenium tests on my ...

Selenium IDE: Incrementing values by 1 and 71

Currently I m incrementing a value called wert by 1 with the following code: getEval storedVars[ wert ]=${wert}+1; The value wert is something like 80401299. I want to add 1 to the value, if it ...

热门标签