0

The easiest way to explain my problem is to provide a picture of what I am trying to retrieve:

Html Properties

I am trying to get the source node of data which path's is 'data.source.displayName' using selenium but I can not simply retrieve this information. I can retrieve information on the first layer of the HTML element such as 'textContent' but whenever I do id.getAttribute of an object it simply returns null. Some example code:

var data = identity.getAttribute('__data__.source.displayName');
                                       data.then(function(classes){
                                        console.log(classes);
                                       }); /*this will print out null*/

var data = identity.getAttribute('textContent');
                                       data.then(function(classes){
                                        console.log(classes);
                                       }); /* this prints out "node_15 → node_20" and works correctly*/
Wolfie
  • 27,562
  • 7
  • 28
  • 55

1 Answers1

0

It's a little bit hard to tell what's exactly going on without more code, but your picture shows actually SVG tags. It could be that the environment you are currently working in doesn't support that in the way you are trying to do it. Maybe this one helps: Read Attributes of SVG-Elements in HTML via JS.

Armin Šupuk
  • 809
  • 1
  • 9
  • 19