SVG rendering incomplete in Firefox - firefox

I've been searching for a few hours for a reason this SVG wouldn't work in Firefox. Anyone know if I'm running into a known bug or have a problem in my code here?
http://codepen.io/ryanburnette/pen/c5274e0076748da1a53a2d16c8702050
I'm asking specifically in terms of the SVG in that Pen. Note my code is in Slim here.
svg.overlay viewbox="0 0 265 281.551"
g
path.outer d="M132.5,0C59.322,0,0,59.322,0,132.5c0,66.245,48.616,121.134,112.115,130.939l16.505,16.504, c2.143,2.144,5.617,2.144,7.762-0.001l0.001,0.001l16.504-16.505C216.385,253.633,265,198.745,265,132.5,C265,59.322,205.678,0,132.5,0z"
path.inner d="M132.502,256.388C64.08,256.388,8.614,200.921,8.614,132.5S64.08,8.612,132.502,8.612,c68.421,0,123.887,55.467,123.887,123.888S200.923,256.388,132.502,256.388z"
Update 1:
I had commas where I shouldn't have. What's interesting is that Firefox was the only browser in which the malformed SVG didn't work properly in spite of the error. Specifically, in Firefox, the element did not render past the point where the comma which should not have been there was located.
Update 2:
As validation has been suggested to me I tried validating my SVG markup using the W3C markup validation service. While this does check the integrity of the XML, it wouldn't have caught this particular problem.

You have added extra commas , in your path. You need to remove them.
Updated codepen
path.outer d="M132.5,0 C59.322,0 0,59.322 0,132.5 c0,66.245 48.616,121.134 112.115,130.939 l16.505,16.504 c2.143,2.144 5.617,2.144 7.762-0.001 l0.001,0.001 l16.504-16.505C216.385,253.633 265,198.745 265,132.5 C265,59.322 205.678,0 132.5,0z"
path.inner d="M132.502,256.388C64.08 256.388,8.614 200.921,8.614 132.5S64.08,8.612 132.502,8.612 c68.421,0 123.887,55.467 123.887,123.888 S200.923,256.388 132.502,256.388z"

Your path is invalid per the SVG specification. Specifically commas are only allowed between numbers i.e. ...l16.505,16.504, c2.143,2.144,5.617... is an error.

Related

xpath find a CSS attribute from DOM not inline

See my code here of my scenarioI have this scenario and I need to use xpath to validate the image, and the gradient colors are present. I tried all kind of xpath combination but still getting errors or not finding it. Many other samples have the style in-line. In this case has a "." class outside of a close tag. code in the image
Could some offer a hand?your text

Setting the correct xpath

I'm trying to set the right xpath for using RSelenium, but I'm not very experienced in this area, so any help would be much appreciated.
Since I'm not allowed to post pictures yet I have tried to add a link to a screenshot of the html:
The html
I need R to scrape the dates (28-10-2020 - 13-11-2020), but so far I have not been able to set the correct xpath when using html.nodes.
I'm trying to scrape from sites like this one: https://www.boligsiden.dk/adresse/topperne-9-3-33-2620-albertslund-01650532___9__3__33
I usually do this on python rather than R
As you can see in this image when you right-click on the element concerned. You get a drop-down menu with an x-path to the element.
Other than that, the site orientation and x-path might change and a full x-path might be a good option in the short-run, so I rather prefer driver.find_element_by_xpath('//button[contains(text(),"Login")]')\ .click()
In your case which would be find_element_by_xpath('//*[contains(#class, 'u-pb-4 u-block')]')
I hope this helps and it is mostly the same across different languages

Unable to identify element in Blue Prism using XPath

I have spied an input text box using the Application Modeller of Blue Prism and was able to successfully highlight the text box using the below XPath:
/HTML/BODY(1)/DIV(4)/main(1)/DIV(1)/DIV(1)/DIV(1)/DIV(2)/DIV(1)/DIV(1)/DIV(2)/IFRAME(1)/HTML/BODY(1)/DIV(2)/FORM(1)/DIV(3)/TABLE(2)/TBODY(1)/TR(1)/TD(1)/DIV(1)/DIV(1)/DIV(1)/DIV(2)/DIV(1)/DIV(1)/DIV(1)/DIV(1)/DIV(1)/DIV(1)/DIV(1)/DIV(1)/DIV(1)/SPAN(1)/DIV(1)/DIV(2)/DIV(1)/DIV(1)/DIV(1)/DIV(1)/DIV(1)/TABLE(1)/TBODY(1)/TR(1)/TD(1)/INPUT(1)
I wanted to use a more robust XPath and to achieve that I was trying to use the below XPath:
//*[#id="CT"]/div/div/div/div[1]/div[1]/table/tbody[1]/tr/td/input[1]
The above XPath was identifying the element correctly in Chrome but was getting the below error message when trying the same in Blue Prism:
Error - Highlighting results - Object reference not set to an instance of an object.
Let me know if I am doing anything incorrectly.
Sorry for replying to a pretty old one! The workaround we've devised for this scenario (where making the path dynamic requires too long of a loop / search) is to use Jquery snippets. If the page is using jquery it is trivial to execute these queries very quickly using the blue prism capability of executing javascript functions.
And we put in an enhancement request, because it'd be supremely useful functionality.
Update: As a user points out below, the vanilla js querySelector method is probably safer and more future proof than using jquery if it is possible to be used.
Blue Prism does not fully support the XPath spec; alas the construct you're attempting to use here won't work.
Alternatively, you can set the Path attribute of an application modeler entry to be Dynamic, which allows you to insert dynamic parameters from the process/object level to pinpoint elements you'd like to interact with.
Unfortunately Blue Prism doesn't actually use "real" XPaths, but only an extremely limited subset: Absolute paths without wildcards. (Note: It is technically possible to match the XPath to a string with wildcards, but this seemingly causes BP to check every single element in the document, and is so slow it is almost never the right solution.)
For cases where an element can't be robustly identified via the BP application modeler (maybe because it requires complex or dynamic selectors), my workaround is to inject a JS snippet. JS can select elements much more reliably, and it can then generate the BluePrism path for that element.
Returning data from JS to BluePrism is not trivial, but one of the nicer solutions is to have JS create a <script id="_output"> element, put JSON inside it, then have BluePrism read the contents of this element.

Assign hyperlink attribute to svg element not working

I am trying to follow the advice laid out in this post's answer and comments: Hyperlinks in d3.js objects to add hyperlinks to circles in a d3.js bubble graph. Here's where I am trying to do this, and here's the original bl.ock I am trying to modify. As you can see all I've done is the following:
Replace <html> tag with: <html xmlns:xlink="http://www.w3.org/1999/xlink">
Insert this code right after creation of var node
node.append("svg:a").
attr("xlink:href", function(d){return "http://www.google.com";});
I am using Chrome and Firefox to test the page, and I don't see a hyperlink in either. Following some comments on the answer, I have tried:
Removing the html namespace declaration
Using node.append("a")
I don't see any results with any of these options, though I have been clearing my browser cache and using multiple computers to make sure I am seeing the fresh code. What am I doing wrong?
The <a> has no content so it has no click area. You need to make something a child of the <a> nodes.

In smarty div position fixed is not working

In smarty div position fixed is not working. While this one is working in simple php.
This will hardly be a Smarty problem. Just save both HTML pages and locally and compare. What's the difference? Maybe you could even use a diff tool for this. Have you tried to validate the HTML and the CSS? It might also give you some hints.
This is a CSS problem - not a Smarty one. You should consider adding more information to the question and tag it with HTML/CSS.
you can see what's wrong using FireBug with Firefox.

Resources