Java 有一个包含复选框和注释的屏幕,注释在div下左对齐,复选框右对齐
问题:屏幕上有复选框和注释,注释在div下左对齐,复选框右对齐Java 有一个包含复选框和注释的屏幕,注释在div下左对齐,复选框右对齐,java,selenium-webdriver,Java,Selenium Webdriver,问题:屏幕上有复选框和注释,注释在div下左对齐,复选框右对齐 <div id="ScreenData"> <div class="Title"> <div class="pNotes" data-lnotes="1" style="position:relative;"> <div class="laDiv" style="position: relative; display: block;"> <div class="divMgn nt
<div id="ScreenData">
<div class="Title">
<div class="pNotes" data-lnotes="1" style="position:relative;">
<div class="laDiv" style="position: relative; display: block;">
<div class="divMgn ntCnt">07/24/2012 08:42 AM</div>
<div class="noteDiv" style="position:relative">
<div> Text1 </div>
<div> Text2 </div>
<div> Text3 </div>
<div> </div>
<div> Text4 </div>
<div> Text5 </div>
<div> </div>
<div> Text6 </div>
<div> Text7 </div>
<div align="right">
<input type="button" value="No Data" disabled="disabled">
<input id="chk_note" class="chk_note" type="checkbox" value="44344343434123" name="chk_note">
</div>
</div>
</div>
如何在选中相应的“右侧”复选框后立即获取左侧捕获的笔记?您只需将鼠标悬停到未选中按钮为止。选择按钮后,立即获取案例注释
while(!Driver.FindelementByXPath("Xpath for the button which would be selected").Selected)
{
Thread.Sleep(1000); //Wait till button is selected
}
string caseNotes = Driver.FindElementByXPath("xoath for case notes textfield").Text;
如果你能告诉我失败的地方,我就能更准确地帮助你。因为您使用的是Java,所以上述代码可能无法正常工作。需要做一些修改