I'm trying to test the video dimensions using the values in CSS as shown in the image below.
The CSS is being used by the Div below. The below is what I've done so far and the error I get.
def test_video_dimensions(browser):
browser.get(url_for("main.index", _external=True) + "video/title1/?video-height=500&video-width=750")
rows = browser.find_elements(
By.XPATH, "/html/head/style[2]"
)
assert (
rows[0].find_element(By.XPATH, "/html/head/style[2]").text
== "CSS Value"
)
Any help to access the inside of the CSS style tag and compare the values in it?


.textit is going to give you text between tags right ? Now what is == "CSS Value" ? Is it like you wanna get css value of the mentioned web element ?//style[@class= 'vjs-styles-dimensions']and see if it's getting highlighted or not.