I would like to get the value hreffrom an element <a>in Splinter.
href
<a>
Is there any api method for this?
If you select items using the find_by_ * methods , the s instances returned by them . After you select the element of interest to you (most likely, an instance), refer to the property as a dictionary: ElementList ElementAPI
ElementList
ElementAPI
the_element['href']
#simplest possible working example demonstrating this in action import splinter b = splinter.Browser() b.visit("http://www.google.com") elems = b.find_by_tag("a") for e in elems: print(e["href"])
Source: https://habr.com/ru/post/1527221/More articles:Android - Intent Sniffing - androidSitecore ContentSearch LINQ Unsupported expression node type: Parameter - linqCSS / Javascript image size to fit and maintain aspect ratio - javascriptis there something like 'with_indifferent_access' for arrays that you can use for include? - ruby | fooobar.comHow to drag a div if someone clicks on input in a drag and drop? - javascriptLaravel 4 Fill a dropdown list with two database columns? - phpWebstorm karma / jasmine angularjs testing - support module error undefined - angularjsboto dynamodb batch_write and delete_item - 'The provided key element does not match the scheme' - pythonПопытка прозрачным методом безопасности "Microsoft.Web.Helpers.PreApplicationStartCode.Start()" для доступа к критическому критическому методу - c#Fiddler Answering Machine + regex - regexAll Articles