QTP - Webelement does not have a SetText



This is a very simple issue where a QTP user is unable to type in text inside a webelement (which might be an edit box)

Solution:

1. Make sure the parent is not a Frame that is redundant
2. Delete any such frames from the Object Repository
3. Use the .Object method
4. .innertext as the sub method

Here is an example:
Browser().Page().WebElement().Object.innerText = "Test value to be written"

That's how easy it is to write into any webelement object!

Happy Testing!

Comments

Popular posts from this blog

Software Testing @ Microsoft

Trim / Remove spaces in Xpath?