I am using rml as reporting language for openerp7. In there i would require to put a page break after a text.
My Code is below
<!-- Here i am printing a table which consumes half of the page -->
<b> This is the first page Text. After this all should come in the second page </b>
<blockTable style="Table4">
<condPageBreak height="8cm"/> <!--This doesn't work. even if i give any value to the height attribute -->
<tr>
<td>
<para style="P26"> Text as a paragraph </para>
</td>
</tr>
</blockTable>
Kindly Clarify me. Thanks for your time.
This works fine for me.
<!-- Here i am printing a table which consumes half of the page -->
<b> This is the first page Text. After this all should come in the second page </b>
<condPageBreak height="9cm"/>
<blockTable style="Table4">
<tr>
<td>
<para style="P26"> Text as a paragraph </para>
</td>
</tr>
</blockTable>
It was a mistake to give it as less.
Related
I want to append an element to a specific element when the user clicks the button. The scenario goes like this. Is there another way to deal with that kind of problem?
<table>
<tbody>
<tr>
<td>
One
<button>delete</button>
<button x-on:click="edit(passIdToFunc)">edit</button>
</td>
</tr>
<tr id="one" style="display: hidden"></tr>
<!-- append x-teleport dom node to here when current value is id = one -->
<tr>Two</tr>
<tr id="two" style="display: hidden"></tr>
<tr>Three</tr>
<tr id="three" style="display: hidden"></tr>
...
</tbody>
</table>
<!--
For the initial render, or if there is no table data,
I would like to append it to somewhere else with display none.
-->
<template x-teleport="computedString">
...
</template>
This looks like the wrong usage for x-teleport, though it's not clear from the example where you are teleporting to. You can just use x-show to toggle display:none if that's what you're looking for.
I was writing my ruby (2.0) script which reads a web page & it was working fine. Then I installed ruby 2.2 and suddenly my nokogiri stopped searching sub tags but not all. It still finds some sub tag and some aren't just being found in the same script.
I reverted back to 1.9 but its still doing the same thing. Currently I have installed ruby 2.1.6. I am loading pages with Watir-webdriver and open-uri. The following page is being opened by open-uri.
For an example, here is my code:
htmlPage = '<html>
<head></head>
<body>
<table width="100%" border="1">
<tbody>
<tr valign="top">
<td width="38%" bgcolor="#EFEFEF">
<b>
<font size="4">NPL Listing History</font>
</b>
</td>
<td width="62%" bgcolor="#EFEFEF">
<b>
<font size="4">Dates</font>
</b>
</td>
</tr>
</tbody>
</table>
</body>
<html>'
page = Nokogiri::HTML(htmlPage)
puts page.css("table [border='1']")
This should get me the table with border 1 but I get nil/null.
Am I doing something wrong? Or something I am missing?
Thanks!
Your problem is the space. In CSS selectors whitespace is the descendant combinator, so table [border='1'] means "all descendants of a table that have a border attribute equal to 1. What you want is table[border='1'], which means "all table elements that have a border attribute equal to 1."
I need XPATH for <tr> that contains text 'abc' in second <td> and text 'xyz' in third <td>
Tried but no luck.
final String XPATH = "//tr[td[contains(.,'abc')] and td[contains(.,'xyz')]";
Your expression actually almost selects what you want (once you fix the missing last ]). You just need to specify positions of the <td> elements.
//tr[td[2][contains(.,'abc')] and td[3][contains(.,'xyz')]]
For the following XML document:
<document>
<table>
<tr>
<td>foo</td>
<td>abc</td>
<td>xyz</td>
</tr>
<tr>
<td>foo</td>
<td>bar</td>
<td>xyz</td>
</tr>
</table>
</document>
this returns a node-set with the first <tr> element of the document in document order.
I want to create an xpath for clicking on "run " (4th column) based on the first column value (xyz). the below xpath doesnt work. Can you suggest a better way of writing the xpath.
//table/tbody/tr/td[text()='xyz fix']/parent::tr/td[4]
<div id="main">
<table class="FixedLayout" width="1000px">
<tbody>
<tr></tr>
<tr>
<td class="RowHeight">
xyz
</td>
<td>xyz fix</td>
<td>1125</td>
<td>
Run
</td>
</tr>
<tr>
<td class="RowHeight">
abc
</td>
<td>abc fix</td>
<td>1125</td>
<td>
Run
</td>
</tr>
</tbody>
</table>
</div>
I don't see why your one didn't work. Please clarify what it means "doesn't work". NoSuchElementException? ElementNotVisibleException? Wrong XPath? Not clicking the link or what?
Meanwhile, try the following XPaths (but the issue could be your Selenium code instead of XPath):
Here I assume you want to the <a> link instead of <td>, because you mentioned you want to click it.
Use XPath predicate:
//*[#id='main']//table/tobdy/tr[td[text()='xyz']]/td[4]/a
Use XPath predicate with attribute selector to avoid using index.
//*[#id='main']//table/tobdy/tr[td[text()='xyz']]//a[contains(#href, 'Instance/Create')]
Use .. to get the parent
//*[#id='main']//table/tobdy/tr/td[text()='xyz']/../td[4]/a
Would love some help here... Firefox displays the last column in the table (an image they click on to edit their email address, it's a link), and IE8 displays nothing for the last column (doesn't even appear to display a column!) I've left out other rows in the table, but similar stuff happens.
Anyone know why?
<table class="profile-display">
<tr>
<td style="text-align: right; color: red;"> Email address: </td>
<td class="profile-content"> <?php echo("$evar"); ?> </td>
<td> <a href="profile_change.php?edit=13"
<img src="../images/writegreen.png" class="profile-edit" alt="Edit"
title="Edit Email Address"
border="0" />
</a>
</td>
</tr>
</table>
Your <a> tag is missing its >. That will cause a browser to not recognize the end of the tag until the first > it sees, which is the end of the img tag. Frankly, I'm surprised that Firefox shows the img.
Edit: Other common causes of this problem are missing quotes and misspelled tags.