Get attribute value in uipath

studio

#1

Hi,

I am tried to get attribute value, but I can’t able to get value.
is there any solution for this?twitter month handler.xaml (6.8 KB)
get attribute element :-(Round in image)


#2

Hello @sams,
Please use below workflow that fetches value that your screenshot shows,

twitter month handler.xaml (8.8 KB)

Sincerely,
Pankaj


#3

Thanks for reply @Pankaj.Patil,

But, I want to get date from the class “js-permalink” of attribute “data-original-title” value from the web page of that url


#4

Hi @sams,

You can make use of inject js script activity to get the value from DOM element

function myFunction() {
var x = document.getElementsByTagName(“H1”)[0].getAttribute(“data-original-title”);
return x;
}

Thanks
Girish


#5

Hello @sams,

Below file retrieves a attribute,
twitter month handler.xaml (7.1 KB)

Result

Thanks,
Pankaj