Read values with JavaScript
Automation taskMediumAsked in: Infosys, TCS, Wipro
"When do you run JavaScript from a test?" One honest answer: to read something the WebDriver API does not expose directly. Here a script returns the page title and a field value. A value comes back only when the script uses return.