I'm making an html table and I need the background of certain boxes to change color that after a selenium webdriver runs. For example if the webdriver runs through the site with no errors it would change the box in the table for that app green or if there were errors change the box color to red. I know I would need java script for this but I have never used it before.
Asked
Active
Viewed 130 times
1 Answers
0
You can use the JavaScript property document.body.style.background
.
Here is an example :
function changeBackground(color) {
document.body.style.background = color;
}
Check here for more information : How do I change the background color with JavaScript?
To change the background color of an box when the user press enter key for instance, click : Changing background color of text box input not working when empty.
Indeed, you will need to adapt with your own element.