Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Data Science by (18.4k points)

I wanted to change the line:

<button _ngcontent-c19="" class="blue-button-disabled" disabled="">CONTINUE </button>

to this:

<button _ngcontent-c19="" class="blue-button">CONTINUE </button>

all that I could do is change a class name from blue-button-disabled to blue-button, but I couldn't remove disabled=""

I used this code to achieve the result:

driver.execute_script("arguments[0].setAttribute('class','blue-button')", element)

1 Answer

0 votes
by (36.8k points)

To remove the attribute disabled="" you can use the below code:

driver.execute_script("arguments[0].removeAttribute('disabled')", element)

 Want to gain skills in Data Science with Python? Sign up today for this Python for Data Science Course and be a master in it

Browse Categories

...