Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Qtp script not working in function
#1
Not Solved
Hello,

From past 2 days i m getting strange behavior from qtp.
Can you guyz please help me out!!! Sad

I have two functions which in function file and i am calling functionA from functionB within that file.

Working of Functions:

Code:
Function FuncA(Services_name)
   Dim abc, row_count
    row_count = Browser("Browser").Page("Page").WebTable("Account Name").GetRowWithCellText(Services_name)
    MsgBox row_count
    set abc = Browser("Browser").Page("Page").WebTable("Account Name").ChildItem(row_count,1,"WebCheckBox",0)
    abc.click
End Function

Code:
Function FuncB(abc, xyz)
call FuncA("service1")
call FuncA("service2")
call FuncA("service3")
.....
...
...
..
..
End Function


Its a CRM Project, FuncA is used for adding services by clicking on provided services. so FuncB will call FuncA, check the checkbox for the provided services and the services will get added.
My problem is when i call FuncA from FuncB, it enters into the function but it gives row count is -1(service1 is present at second row)

And if i call same function from the test it works fine showing row count as 2.
Please if any one having solution for this then u can share with me...

Thanks & Regards
Zeeshan Shaikh.
Reply
#2
Not Solved
Try changing the abc.click to abc.set "ON"
You are wanting to activate or turn on a webcheckbox

hth
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP has stopped working kotaramamohana 11 19,502 12-28-2016, 10:55 AM
Last Post: Bhuvaneswari.A
  When i use xpath in OR in QTP 11, its not working ginne 0 2,902 11-12-2013, 10:02 PM
Last Post: ginne
  QTP 11 is not working for Internet Explorer 10 Niraj 5 10,124 08-14-2013, 01:34 PM
Last Post: Niraj
Exclamation QTP not working in IE 8 shaam 4 6,236 08-11-2011, 05:37 PM
Last Post: uma87
  QTP Scripts not working on new machines Ramya_G 1 2,485 01-15-2009, 12:54 AM
Last Post: kishoreinchennai

Forum Jump:


Users browsing this thread: 1 Guest(s)