I want to change the css element style using Python Selenium while doing automation to increase the height of the page. The html of the element is as follows:
<div style="overflow-y:scroll;overflow-x:hidden;height:150px;">
I know that I can use something like the code below to do this:
driver.execute_script("document.getElementById('id name').style.height = '2000px';")
or
driver.execute_script("document.getElementByClassName('class name').style.height = '2000px';")
But there is no id or class in the HTML (there's only style).