I’m trying to get get a background color of a element and see if its bold using getElementValueOfCssProperty
. For the color it returns "rgba(255, 222, 173, 1)"
, which I can convert to hex
, which aligns what I see in Chrome
. But why would it not just return the hex
code?
My code in R:
<code>element$getElementValueOfCssProperty("background-color")
</code>
<code>element$getElementValueOfCssProperty("background-color")
</code>
element$getElementValueOfCssProperty("background-color")
When I try to check if a element is bold it returns the value 700
. How should I interpret that and why does it, not just return bold
My code:
<code>element$getElementValueOfCssProperty("font-weight")
</code>
<code>element$getElementValueOfCssProperty("font-weight")
</code>
element$getElementValueOfCssProperty("font-weight")
Website I’m trying on is Wikipedia Olympics