I'll try to explain what I see in a few words.
I use webdriver + testNG on a win7 machine.
I have a table and get a reference to it. When I try to get all the text contained in such table, if it's empty (only header) then there are no problems .
But, if there are more rows, the table.getText() is not working properly and the result is:
A script on this page may be busy, or it may have stopped responding.
You can stop the script now, or you can continue to see if the script will complete.
Script: file:///C:/Users/VM-AUT~1/AppData/Local/Temp/anonymous2085126608473413720webdriver-profile/extensions/fxdriver#googlecode.com/components/command_processor.js:6047
I have tried increasing the timeout but the result is the same. If I decide to continue, getText() returns me all the values and the script continues.
This is a very short description but I don't want to be boring, but if more details are needed just let me know.
A few more infos:
If the table has +-5 records it works fine.
There is a problem if it has +-20 records per page (it's possible to switch between pages)
The problem persists with FF 23 ( looks fine with chrome & IE) but didnt check with previous FF versions
I use java + testNG + selenium grid but have the same problem on my local machine as well
If I select CONTINUE at the "A script on this page may be busy....." message, gettext()returns me the correct values I use the selenium 2.33
Table looks like:
driver.findElement(By.xpath(".//*[#id='smslog_outer_table']")).getText()
<table id="smslog_outer_table" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="left" style="vertical-align: top;">
<table class="table table-condensed" cellspacing="0" cellpadding="0">
<colgroup>
<tbody>
<tr class="gwtutility-table-tr-head">
<tr class="delivered">
<td class="" colspan="1">
<div class="gwt-Label">043081410085553301</div>
</td>
<td class="log_date_time" colspan="1">
<td class="" colspan="1">
<td class="" colspan="1">
<td class="" colspan="1">
<td class="" colspan="1">
<td class="" colspan="1">
<td class="" colspan="1">
<td class="log_status" colspan="1">
<td class="log_date_time" colspan="1">
<td class="log_message" colspan="1">
</tr>
<tr class="delivered">
<tr class="delivered">
</tbody>
</table>
</td>
</tr>
<tr>
</tbody>
</table>
Related
I have some content which does not take up the entire column. so I was trying to postion an image to that side so that it saves some space.
I tried checking for grid layouts or column layout in md but none of it has provided info on how to do it
This is what i am looking for
the code is # here
... thanks
The Markdown table does not support cell merge by default, so you should use HTML table.
And in comment, you said
"Even this time the image took only one row, ..."
in this case just use rowspan.
<table>
<tr>
<td>- Identifying cutomer needs (requirments)</td>
<td rowspan="11">
<img src="https://user-images.githubusercontent.com/74305823/118094261-783e8280-b409-11eb-8f50-8ed0b304fef0.png" width="300"/>
</td>
</tr>
<tr>
<td>- market analysis (requirements)</td>
</tr>
<tr>
<td>- defining goals (requirements)</td>
</tr>
<tr>
<td>- Establishing functions (Prodct concept)</td>
</tr>
<tr>
<td>- Task Specifications (Prodct concept)</td>
</tr>
<tr>
<td>- Conceptualizatoin (Solution concept)</td>
</tr>
<tr>
<td>- Evaluating Alternatives</td>
</tr>
<tr>
<td>- Emnodiment Design</td>
</tr>
<tr>
<td>- Analysis and Optimization</td>
</tr>
<tr>
<td>- Experiment</td>
</tr>
<tr>
<td>- Marketing</td>
</tr>
</table>
EDIT
AS #tarleb said, using <ul>...</ul> tag can be more simple.
<table>
<tr>
<td>
<ul>
<li>Identifying cutomer needs (requirments)</li>
<li>market analysis (requirements)</li>
<li>defining goals (requirements)</li>
<li>Establishing functions (Prodct concept)</li>
<li>Task Specifications (Prodct concept)</li>
<li>Conceptualizatoin (Solution concept)</li>
<li>Evaluating Alternatives</li>
<li>Emnodiment Design</li>
<li>Analysis and Optimization</li>
<li>Experiment</li>
<li>Marketing</li>
</ul>
</td>
<td>
<img src="https://user-images.githubusercontent.com/74305823/118094261-783e8280-b409-11eb-8f50-8ed0b304fef0.png" width="300"/>
</td>
</tr>
</table>
Hi im having a issue with a simple problem. because for some reason i dont find anything wrong with my codes. Seems like my code is not reading my colspan. seems like this problem as been mark as duplicate. but i dont want to specify the width of the table since i want the table to be responsive and i use bootstrap table
<div>
<table class="table table-condensed">
<thead>
<tr class="text-uppercase text-contrail table-dark-head">
<th colspan="3">Spillage</th>
<th>Total</th>
<th>Remarks</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="3">Material Cost / Kg</td>
<td>
<input></input>
</td>
<td>
<input></input>
</td>
</tr>
<tr>
<td>Spillage at 0.5%</td>
</tr>
</tbody>
</table>
</div>
i put this code inside my template. please see the image for the result. The Total and Remarks should be on the right side. but it end up with balance width.
The tr id element is not working as a destination for links.
I am trying to create the link www.mywebsite.com/page1.asp#row1
Each of these rows has a picture and description that I need to have go to a distinct url.
The code below is the closest that I have gotten, but it is still not working and I do not know why.
I am building this website in Volusion. This HTML is going into a content block within an already built framework.
<table>
<colgroup><col width="30%">
</colgroup>
<tbody>
<tr id = "row1">
<td><div style="text-align: center;"><img src="/img1.JPG" alt="" align="top" border="0px"></div></td>
<td valign="top">1st Image</td>
</tr>
<tr id = "row2">
<td><div style="text-align: center;"><img src="/img2.JPG=" align="top" border="0px"></div></td>
<td valign="top">2nd Image</td>
</tr>
<tr id = "row3">
<td><div style="text-align: center;"><img src="/img3.JPG" alt="" align="top" border="0px"></div></td>
<td valign="top">3rd Image</td>
</tr>
</tbody>
</table>
The path for the image is wrong I guess. Maybe once check the path like there might be another folder you may have forgot to add (like image/img1.jpg). or maybe try ./ instead of /. Also img2 src is wrong. please correct it
I have a problem to put the input from user in one line separate by comma.
As below code:
<table width="691" border="0" cellpadding="0" cellspacing="0">
<tr><%do while not rs2.EOF%>
<td width="159" rowspan="2" class="commontextBold"> </td>
<td width="200" rowspan="2" class="commontextBold"> </td>
<td>
<span class="commontextBold"><%=rs2.fields("do1").value%>
<% rs2.movenext
loop%>
</span>
</td>
From line 5 to 10, that is the code using to print the output.
For this code the output will looks like (as can see in attachment image):
1111111 -space- 2222222 : this output look like when using loop it will give to much space between the output
I need the output looks like this,
1111111,2222222
The output may be more that two, depend on user input.
How can i avoid the output print without too many spaces between the value?
FYI, this output will be print in the courier slip.
Code
output
Not quite sure if this is want you want:
<table width="691" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="159" rowspan="2" class="commontextBold"> </td>
<td width="200" rowspan="2" class="commontextBold"> </td>
<td>
<%do while not rs2.EOF%>
<span class="commontextBold"><%=rs2.fields("do1").value%></span>
<%rs2.movenext
loop%>
</td>
I got this code:
<th:block th:if="${!#lists.isEmpty(partyInfoByUploaderList)}" th:each="pInfo : ${partyInfoByUploaderList}">
<h4 th:text="${pInfo.getCharName()}"></h4>
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th:block th:if="${!#lists.isEmpty(pInfo.getCharColumnTitles())}" th:each="title: ${pInfo.getCharColumnTitles()}">
<td th:text="${title}"></td>
</th:block>
</tr>
</thead>
<tbody>
<tr>
<th:block th:each="val: ${pInfo.getCharColumnValues()}">
<td th:text="${val}"></td>
</th:block>
</tr>
</tbody>
</table>
And I got this result:
http://screenshot.ru/6dfbe559f905a17dff44d360b5d13f28
So this code correctly create table head, and dont parse table body.
BTW, after delpoy this code appear at another place:
<th:block th:each="val: ${pInfo.getCharColumnValues()}">
<td th:text="${val}"></td>
</th:block>
Web source code in browser:
http://screenshot.ru/9d3fab8030c5ca382ab81094e0c1ca86
Question #2:
Why this code produce TemplateProcessingException error?
P.S. Not enough reputation for images, so just links. Soz
According to Thymeleaf Documentation, <th:block></th:block> should wrap <tr></tr> and not the opposite. So you should try this :
<th:block th:each="val: ${pInfo.getCharColumnValues()}">
<tr>
<td th:text="${val}"></td>
</tr>
</th:block>