Xpath search and next text - xpath

I want to search for a text in the product detail and get the text written in the next span, can you help me?
"fiyat": '//*[#id="product-detail"]/[text()="Kredi Kartı/Banka Kartı İle Öde")]"))/following-sibling::span/span/text()',
Hi
I want to search for a text in the product detail and get the text written in the next span, can you help me?
I want to find the underlined text and get the text in the circle
Photo

This xpath should be enough
//span[text()="Kredi Kartı/Banka Kartı İle Öde"]/../span[2]/span

Related

XPath expression to select text WITH link

I want XPath to return a text with a link embedded in it, can I return both at the same time or am I forced to return:
the link & separately
the text label of the link
You can do some thing like below.
//actor[#color='blue']/concat(#id,",",#class)

Highlighting search keyword in Slickgrid

I'm developing logs viewer web program with Vue.js
I receive log data with ajax and display it with Slickgrid.
What i need to do is highlighting keyword after searching.
I found some examples highlighting whole cells or row but couldn't find highlighting specific keyword in cell.
ex)When i search a word 'cat', slickgrid shows cells which include 'cat'.
And i need to highlight the word 'cat' in the cell.
Anyone knows how to do this? or any examples??
Thank you.
You'll need to write a custom formatter. See here for an example page. Make sure you're using the 6pac repo - it's up to date, the MLeibman repo is unmaintained now.
Re highlighting a word, you'll need to return HTML from the formatter, and just have a special span to hilight the word, eg:
we will build a <span class="hilight">wall<span/>
It's a tricky business finding a full word, that is making sure it's not part of another word, if that's what you want eg.
did you buy the <span class="hilight">wall<span/>paper yet?
That's a whole 'nother Google search in itself.

How to find xpath of an element under a heading

in a Web page :
<h3 class="xh-highlight">Units Currently On Bed List</h3>
"[total beds=0]
"
i want to find xpath of total beds=0.
how can i do?
Your question and your comment are a bit contradictory. Do you want to find the text after a heading or do you want to find the element containing the text [total beds=0]? Also, how exact do you want to navigate your document?
To find a text after any h3 element you can use this: //h3/following-sibling::text()[1] (see XPath - select text after certain node).
To find a text after an h3 element with the class "xs-highlight" you can use this: //h3[#class='xh-highlight']/following-sibling::text()[1]
To be even more precise you can also look for the heading text: //h3[#class='xh-highlight' and text()='Units Currently On Bed List']/following-sibling::text()[1]
This doesn't match the html in your first comment however, so you might want to adjust the header class and text values. Also, it will find any first text even if there are other elements between it and the h3 element.
Now, your second comment makes it seem you actually want to find the element containing the text. The reason //*[text()='[total beds=0]'] doesn't work is because of the newline in the text. If you can get rid of that in the source it should match, otherwise you can "ignore" it in the xpath by using //*[normalize-space(text())='[total beds=0]']. (This is assuming the quotes around the text in your question aren't actually in the document.)

Displaying a text on the last page of crystal report?

This might be a very naive question but i am not able to get to it.
I have a simple text object that i wish to display only on the last page of the report after all my details section and group footer sections are displayed.
I have tried applying Suppress property on page footer to work, but it does not happen. Then i tried suppressing the text object but that did not work as well.
This is what i pushed into formula field:
if PageNumber = TotalPageCount then
false
else
true
Am i missing something.
Any help will be highly appreciated.
Thanks in advance.
Try putting your text object in the Report Footer section.
you will required to use Report Footer. please follow a link. if this is the answer to your question mark the answer.
Link:.
http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topic=/com.businessobjects.integration.eclipse.doc.crdesigner/reportdesigner/crconreportfooter.htm
Create a section below the last group and place your text field there so that when ever everything is displayed you will get the required text
E.g:
If you have Group1 and Group2 then create a section in group footer of Group1 using "Insert Section below and place the Text field there.
Resolved...!!! The problem was that in the Format Text dialog box, after writing the formula i had checked the Suppress Check Box because of which the Text Object was Suppressed all the time. Thanks for all your help...!!

XPath function to combine text nodes and retrieve it to one Google Spreadsheet cell

I'm completely rookie in XPath (I don't even know how to paste proper html into this post ;-p) subject and I need some help. I would like to retrieve text which is in quotation marks and put it into a one cell in Google Spreadsheet. Right now I can only retrieve this text into separate cells.
http://imm.io/oLYI
Does string(//tr[class='darkGreen']/td[2]) result in what you want? Your XML fragment looks incomplete and I'm not sure if you only want the contents of the second cell so it's a wild guess if this fits your need.

Resources