ElementGetText ( Zone, Element, Index)
|
|
|
|
|
Get text from element - The text will be saved as a string.
Scenario: We will use the Eribank demo application.
After selecting the country from the country list using the elementListSelect command, we would want to confirm that the text on the Country text field is indeed what we choose.
The command to run
The result (from the console log)
By default elementGetText will return the first 255 characters.
To change the default text length use the command setProperty with name of the property "max.text.size".
For example:
client.setProperty("max.string.size", "500");String str0 = client.elementGetText("NATIVE", "xpath=//*[@id='countryTextField']", 0);String str0 = client.elementGetText("NATIVE", "xpath=//*[@id='countryTextField']", 0);str0 = client.ElementGetText ( "NATIVE", "xpath=//*[@id='countryTextField']", 0 )Reportvar0 = self.client.elementGetText("NATIVE", "xpath=//*[@id='countryTextField']", 0)my $str0 = $client->elementGetText("NATIVE", "xpath=//*[\@id='countryTextField']", 0);