Get color from webpage

Dear all,
I would like to ask you for help. I struggle with colors from website. I used activity GET COLOR from marketplace, yesterday it works (I got gray, maybe luck), today I got just white or pink (is not on page!!!).
Webpage contains table with colors which neeed to be used for IF activity. The html contains color name, but UI Explorer do not provide this option. Just name and column ID.:confused:

Do you have any idea, how to treat it??
Please find my procedure:

  1. Open browser
  2. Maximasize window
  3. Get position
  4. Assign positions into Integer
  5. Color screen detect (based on position in 4th point)
  6. Display color

Part of table with html code:

Ui Explorer options:

1 Like

Hey @PetraC,

Use Get attribute and then indicate the element.

Mention style in get attribute. It will retrieve the entire style from which you can get background color property by string manipulation (splitting may be)

Hope this helps

Thanks :slight_smile:

1 Like

Thank you. I have used GET ATTRIBUTE just for “plus button” but did not know that can get also colors, size, etc. :+1:

3 Likes

Hey @PetraC,

Hope you solved it :slight_smile:

@PetraC
have a look on following custom activity:

@PetraC You can use Inject Js activity and get the colour of an element

Dear all, I had to find different solution as I had troubles with indication. Even if I got accurate points, the background was allways white. And from another datatable on webpage I was not able to get color information from outerhtml.
I believe, that all mentioned option works, but I had to find another decesive parametr.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.