cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Adhil_08
Frequent Visitor

Need to Extract Radio Button State.

Hi All,

 

Need to extract state of the radio button using Web Automation, in these trying to extract state of the radio button in CSS elements, but in both state always showing checked in CSS elements, even I was tried to use Image but that couldn't help. Is there any way to accomplish this task. 

 

 

Thanks in advance.

 

Adhil_08_0-1650438549584.png

Adhil_08_1-1650439407263.png

 

 

8 REPLIES 8
Pavel_NaNoi
Continued Contributor
Continued Contributor

Are you using CSS only to accomplish this? As otherwise you can use UI Elements to find the state of the radio button as that's what power automate desktop uses to work in browsers anyway.

 

However if its CSS only, you could try using OCR and try your best to extract the relevant text that you need to check the state of the radio button.

VJR
Super User
Super User

I think this is the class and 'checked' attribute gives whether it is checked or not.

 

 

VJR_0-1650509801560.png

 

Also see if you are able to inject javascript (using javascript from webpage PAD action) and get the value of the option button.

https://www.techiedelight.com/get-value-of-selected-radio-button-javascript/

 

Hi @VJR ,

 

Even i was checked on that, it was showing checked, if radio button clicked or not clicked the state will be always checked.

Which url have you checked?

He is my colleague so i was checked directly.

Okay, if UI elements don't give the right results can try from the code behind way (javascript) suggested above.

 

Also have you tried "Get details of elements on webpage"

 

If this is a shareable url I can give it a try.

we need to extract from service now for url i need to provide userid password as well, JavaScript not tried every time if click or unclick selector remains same, get details tried but we can get wch radio button was clicked, it will get only yes not getting radio button value.

For ServiceNow we have been reliably using APIs as screenscraping its web elements has failed many times.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,105)