Click a button through JavaScript
Automation taskMediumAsked in: Infosys, TCS, Wipro
"A normal click fails because another element covers the button. What do you do?" A JavaScript click works, but it skips the checks a real user goes through (visible, enabled, not covered). Be ready to explain that trade-off and say when you would accept it. Here you click the left-click button through JavaScript and print its new text.