I want to get the text of this "Dropdown List" element to a variable, assert it against expected value and then type it to a text field.
open url "https://the-internet.herokuapp.com/dropdown"
click "Dropdown List" heading
save text of element matching "h3" as "actual_text"
save value of element matching "h3" as "actual_value"
check that "actual_value" contains "Dropdown List"
However ,it fails with please help
*Errors:
Couldn't find element for check that "actual_value" contains "Dropdown List"
open url "https://stackoverflow.com/users/login"
type textfield "email" "actual_text"*
I checked the documentation but no luck
A similar thing is achieved.
open url "https://www.blazedemo.com/"
check that button "Find Flights" is visible
// To get value from Find Flights
grab value from "btn btn-primary" and save it as "variableName"
check that stored value "variableName" itself contains "Find Flights"
Another way is
grab value from button to the right of "Remember me" and save as "buttonText"
check that stored value "buttonText" contains "Submit"