selenium webdriver - how to get tooltip text which is generated dynamic -


<tbody>  <tr class="" style="height:65px;">  <tr class="" style="height:65px;">   <td class="dhx_matrix_scell" style="width:99px; height:64px;">ashmita </td>   <td>    <div class="dhx_matrix_line" style="width:1181px; height:65px; position:relative;">     <div class="dhx_marked_timespan dhx_matrix_now_time" style="height: 64px; left: 105px; width: 1px; top: 0px;"></div>     <div class="dhx_marked_timespan gray_section" style="height: 64px; left: 588px; width: 591px; top: 0px;"></div>     <div class="dhx_cal_event_line booked" style="position:absolute; top:2px; height: 17px; left:99px; width:28px;" event_id="1374736442513">     <table class="" cellspacing="0" cellpadding="0" style="width:1181px; height:65px;">    </div>   </td>  </tr>  <tr class="" style="height:65px;">  <tr class="" style="height:65px;">  <tr class="" style="height:65px;">  <tr class="" style="height:65px;"> </tbody> 

in above code when hover mouse on element <div class="dhx_cal_event_line booked" style="position:absolute; top:2px; height: 17px; left:99px; width:28px;" event_id="1374736442513">, tooltip tipsy generate dynamically; can't catch using firepath. have tried action class like

actions action = new actions(driver); webelement element = driver.findelement(by.xpath(".//*[@id='scheduler']/div[3]/table/tbody/tr[2]/td[2]/div/div[4]")); action.movetoelement(element).build().perform(); system.out.println("the tool tip text is"+element.gettext()); action.movetoelement(element).release().build().perform(); 

but null element text.

when this:

actions action = new actions(driver);     webelement element = driver.findelement(by.xpath(".//*[@id='scheduler']/div[3]/table/tbody/tr[2]/td[2]/div/div[4]"));     action.movetoelement(element).build().perform(); 

put string source = driver.getpagesource(); , save source somewhere (or print console)

take @ page source, see element has tooltip text in it, , can write selector it.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -