Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
fing the string in web page
#4
Solved: 11 Years, 4 Months, 3 Weeks ago
Hello All,

I have a script to find a string in a web page.
But my page contains the string at three different position with three different format.
i want to find the string with particular styling(format).

i got this error

Object doesn't support this property or method
Line (10):
Code:
"If Instr(strBodyText,val)>0 Then".

here is my code

Code:
strBodyText=Browser("Jsdl").Page("Jsda").Object.Body.innertext
dim val
set val=WebElement("html tag:=H1","innertext:="&DataTable("categories", dtGlobalSheet))

If Instr(strBodyText,DataTable("categories", dtGlobalSheet))>0 Then
Reporter.ReportEvent micPass,"pass","category found 1"
Browser("Jsdl").Page("Jsdl").WebElement("html tag:=H1","innertext:="&DataTable("categories", dtGlobalSheet)).click
else
Reporter.ReportEvent micFail,"invalid","category not found"
End If

why this error is occuring?

thanks
sia
Reply


Messages In This Thread
fing the string in web page - by sia sharma - 08-22-2012, 11:21 AM
RE: fing the string in web page - by Ankesh - 08-22-2012, 11:59 AM
RE: fing the string in web page - by sia sharma - 08-22-2012, 02:09 PM
RE: fing the string in web page - by sia sharma - 09-12-2012, 12:54 PM
RE: fing the string in web page - by Ankesh - 09-12-2012, 03:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  click each web link in a page using Index or other method in QTP smeijer 13 24,820 04-29-2017, 04:53 PM
Last Post: kowshik
  VB Script to count number of links in a web page. Suma Parimal 4 25,377 07-01-2015, 12:59 PM
Last Post: govind
  Replace a string in a word document with another string rekha.naik 8 15,583 11-14-2013, 12:58 PM
Last Post: pranikgarg
  Cannot find the "[ WebButton ]" object's parent "[ Page ]" (class Page) sumitparolkar@gmail.com 4 5,174 05-03-2013, 11:53 PM
Last Post: agarwl.anurag
  How to test a Web page Monica Soneja 3 3,567 04-09-2013, 06:37 AM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)