Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
getElementByid("myObhectId") return null???
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,
It looks like it is returning an object for a wrong id .Probably there is another object with the wrong id you gave. Technically, when you try to retrieve an element by passing an invalid id, it throws.."object required error" as I have mentioned in the previous post.
Consider the same example I gave, but pass "sign1" as id you will see the error message in first step itself..the second line of code is not reached yet. If you don't see the error message, you either disabled the error prompt by using "On error resume next" statement somewhere in your code or in the settings "file->Setting->run ->When error occurs during run session(this is a drop down..chosen to proceed with next step)
Code:
set oBtn=Browser("name:=Gmail: Email from Google").Page("title:=Gmail: Email from Google").object.getElementById("signIn1")
If  isobject(oBtn) Then
    oBtn.Click
End If
Reply


Messages In This Thread
RE: getElementByid("myObhectId") return null??? - by ravi.gajul - 02-01-2013, 09:44 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Function return value is not passed during the 3rd iteration premanand1979 0 2,260 10-16-2014, 09:40 PM
Last Post: premanand1979
  how to remove null values in array venkatesh9032 0 2,895 02-19-2014, 06:51 PM
Last Post: venkatesh9032
  GetRoProperties("enabled") returns null? RandomGrin 3 7,431 02-28-2013, 11:27 PM
Last Post: RandomGrin
  Null value of the object swapna_gupta08 4 11,813 02-21-2012, 11:00 AM
Last Post: inborntester
  QTP Test results will return exit codes asrivastava 13 17,038 07-08-2011, 12:57 PM
Last Post: rajpes

Forum Jump:


Users browsing this thread: 4 Guest(s)