From the following link, I need to express a xpath in terms of div, ul, li.
When I copy xpath with chrome, I get the following:
Example for one the xpath:
/html/body/div[1]/div[2]/div[2]/div[1]/div[2]/div/div/div[1]/div[2]/div[1]/div[1]/div[2]/ul/li[5]/ul/li[5]/span[2]
I tried to figure out the conversion solution, by looking at the details, once you see pressing on F12, but something went wrong.
Here is the link of the web site:
https://www.hurriyetemlak.com/istanbul-sisli-fulya-satilik/daire/7326-1354.
I need to express the xpath of "konut tipi","banyo sayısı" in the provided web link.
appreciate our support
You can use following expression to get the xpath by text values.
$x("//*[contains(text(),'Konut Tipi')]")
In you case it is bringing 2 values, so you need to know which one to choose from.
Related
I'm trying to get text in text-area. But not able get it from xpath. How can I get it from any other way?
You are actually not using the correct xpath. There should be a way to identify the content that is there on the screen. The screenshot shows you are using firepath, so click on the data , or check the source for the divs and ids of the data being displayed, if you inspect that page you can find these details.
Is there a way for me to get an element's computed style from a page source? Or, if not from the page source, some other way? I want to be able to go to a web page and then get all the computed styles (via my code; I'm not talking about opening a browser tab and clicking Inspect element). Right now I'm using Python BeautifulSoup to get and traverse the document. This gets me all the elements and their attributes, but not the css styles. Ideally this would be with Python, but I'm open to using other languages.
(Sorry, if this has been answered before. I looked at several questions and they all seemed to have to do with getting the info either from "inspect element" or from your own personal page using javascript.)
I'm using PhantomJS. I inject a JavaScript script into the page that runs getComputedStyle.
You can look for CssParsers like the following
http://www.modeltext.com/css/index.html
http://www.codeproject.com/KB/recipes/CSSParser.aspx
I would like to display links that are pasted in as links rather than text but freetextbox does not seem to do this. For instance, if somebody pastes in http://www.stackoverflow.com it looks like a link but shows up only as text. Do I need to convert this myself or is there a setting in the editor to take care of this?
It depends. In most cases, you need to convert it yourself. Sometimes when you copy a link you are actually getting a link and not just the text. But yes, you'll have to get your hands dirty here.
As the title suggests i've run into a problem with anchors ASP.NET.
I've set them up the same way as you would in standard html
ex:
Introduction
and then further down the page,
<a name="Intro" ...
for some reason when i click the link, the #Intro isnt appended to the url, and i'm not taking to the anchor.
However, if i manually add the #Intro to the url it works.
Also, if i change the #Intro to a name which has no corresponding anchor with the given name attribute it IS appended to the query
What's going on?
This seems more like a browser issue or else you're not including enough code.
The code you showed us looks fine.
You have it around the wrong way. It should be NAME="INTRO" where you want the intro and HREF="#INTRO" when you want to go back to the intro.
#INTRO not #Intro .. works.
Note that there should not be any postback to the server. This is all done on client-side, implemented by the browser. Try recreating this in another browser to disqualify the possibility that its some crazy browser issue. Scan the the source code (in browser, view source) of the page to understand if anything happens when user clicks the intro link (assuming of course you have no events on the links- in that case look for the problem there).
Try dropping the quotes in the name tag and/or adding the page name to the anchor link.
I've a problem which is most likely some ugly CSS mistake, but I just can't spot the solution (and a few changes I tried did not help).
Some of in-text hyperlinks (not all!) are shown by Internet Explorer without the following space.
here is the example
See the link WatchBot just below the Rationale title (and a few similar links deeper in the article). Firefox, Opera, Chrome, Konqueror - all display it properly: WatchBot can. IE (6.0 but IIRC also 7.0) displays it as **WatchBot***can*.
I am using Yui-reset and yui-base. Is it possible that those libraries cause the problem?
Do you have a script running on, and altering, the content in any way? I say this because the page loads normally initially, but looks as though it undergos some modification later in the loading lifecycle.
If you think reset or base are making this happen try removing them one at a time - I haven't had any experience of this error before however (I usually use the full whack: Reset, Grids, Base and Fonts).
What I did notice however is that the first WatchBot link of the page is simply this:
<p>Have you ever been curious how is
WatchBot
picking the games to observe and save? Here is the explanation.</p>
Where as the second link looks like this:
<span>Due to the FICS limitations </span>
WatchBot<span> can
I have no idea what that second span is doing there - might be something to check up on. (It validated fine however - so there's definitely an closing span somewhere).
I'd say a good place to start would be to but a space after the anchor but before the span, rather than right after the span start tag.
Current state of the things: as steve_c spotted first, and buti-oxa confirmed, it looks like the layout is being spoiled by javascript (and as Ross noted, some extra spans are injected). Thank you all, I missed it.
I am to make experiments and selectively disable those scripts (analytics and google ads) to check whether it helps (my current bet is that maybe I have some HTML error or naming conflict)
Did you try to disable pageTracker? It seems to be the only script on your page, and it looks fine to me in its static form.
EDIT: I wondered what span Ross was talking about - I did not see any. I viewed the source. I just learned that Firefox allows to see both source and generated source (Toos/Web Developer/View Source). Sure enough, generated source has additional span inserted.
Solution: my page was spoiled by the text-link-ads script (which, in fact I activated on English blog by mistake - this is script by adkontekst.wp.pl, Polish firm). After disabling it everything is OK.
Thanks for everybody who pointed me into the right direction.