Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Object Required Error
#1
Not Solved
Hi All

I am getting "Object Required Error" while running my script. code is


Code:
option Explicit
Dim VarA
Dim VarB

Browser("Obj1").Page("obj2").login 'Login Page code
Browser("Ob1").Page("obj3").Link() 'Clicking one link
VarA = ....GetRoProperty("obj4") ' There is a webelement which will be a log count (Text like "Log count: 4  "
'There is two spaces after 4. Total can reach upto three digit. ie once it is 999, it i reset to 1. Thing is when it is three digits then also two spaces will be there.

I need to get this count. So i have taken the whole text to a VarA using GetROProperty
Now i have used VarB = VarA.Remove(0,12) So that i can get number 4 in VarB. But at this point while running, error is coming like "Object Required: "Log count: ". How i can proceed? I tried using substring function also but same error. Actually initially i used Right(VarA, 3) but since i have spaces after count and count is having three number places, i couldnt use that.. Right was not giving me any error..

Any suggestions on how to progress on this?

Thanks in advance
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  General Object Error(Find Object Error) akhandesh 1 3,619 02-24-2016, 01:05 PM
Last Post: sindhus
  Script required to run any app as administrator kalyan_srirangam 0 2,641 09-02-2013, 08:18 PM
Last Post: kalyan_srirangam
  Error while creating object using description.create object in VB script SarodeGirish 5 6,277 06-19-2012, 05:30 PM
Last Post: ssvali
  Object Required Error branjitk 6 12,747 06-07-2012, 12:43 PM
Last Post: branjitk
  Error: The systemcannot locate the object specified happened alin 3 5,225 12-16-2011, 02:52 PM
Last Post: alin

Forum Jump:


Users browsing this thread: 1 Guest(s)