Micro Focus QTP (UFT) Forums
Problem Pop-up - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Problem Pop-up (/Thread-Problem-Pop-up)



Problem Pop-up - bebeo - 10-02-2009

When i click button "Send" then Pop-up display. How I must resolve this Problem?


RE: Problem Pop-up - Saket - 10-02-2009

the question is not clear, can you please explain the exact problem.
is this any error you are getting on click?


RE: Problem Pop-up - bebeo - 10-02-2009

Code:
oBrowser="name:="+st+".*"
    oPage="title:="+st
    Set oDesc = Description.Create()
    oDesc("micclass").Value = "WebEdit"
    Set oDesc1 = Description.Create()
    oDesc1("micclass").Value = "WebButton"
      'msgBox oBrowser
      'msgBox oPage
     set obj=Browser(oBrowser).Page(oPage).ChildObjects(oDesc)
     set obj1=Browser(oBrowser).Page(oPage).ChildObjects(oDesc1)
     set obj2=Browser(oBrowser).Page(oPage).Object.All.tags("input")
     set obj3=Browser(oBrowser).Page(oPage).Object.All.tags("TD")
     'Numberobj=obj2.Count()
      index=0
      For Each Element in obj3
        index = index + 1
        'Msgbox  Element.innerHTML 'Reading string between tags <td> of table
        'Msgbox  Element.maxlength
      Next

     'msgBox obj2.ToString()
     For i=0 to Numberobj-1
       'msgBox obj2(i).ToString()
     Next
     NumberOfEdits = obj.Count()
     NumberOfButton = obj1.Count()
     'msgbox NumberOfEdits
     Dim  A(20)
     Set fso = CreateObject("Scripting.FileSystemObject")
     For i = 0 To NumberOfEdits-1
        If (fso.FileExists("E:\TestData\Input.xls")) Then
          DataTable.Import "E:\TestData\Input.xls"
        End if
         datatable.getsheet(1)
         obj(i).Set datatable.value(datatable.GetSheet(1).GetParameter(i+1).Name,1)
          'msgBox obj(i).ToString()
     Next
     Wait(10)
     index=0
For Each Element in obj2
       Wait(2)
       If Element.Type="button" and Element.name="Send" then
         'msgbox Element.Type
         'msgbox Element.name

    obj2(index).Click
Data input.xsl

name address phone email title content
Test 234234 test@yahoo.com test test
Test1 Test1 345435 test@yahoo.com test test
Test Test 234236 test@yahoo.com test test

name was compelled data to have.
When i was submmited button "Send" then a popup dialog messager but i want continue test run. How I must resolve this Problem?
(10-02-2009, 02:05 PM)bebeo Wrote: oBrowser="name:="+st+".*"
oPage="title:="+st
Set oDesc = Description.Create()
oDesc("micclass").Value = "WebEdit"
Set oDesc1 = Description.Create()
oDesc1("micclass").Value = "WebButton"
'msgBox oBrowser
'msgBox oPage
set obj=Browser(oBrowser).Page(oPage).ChildObjects(oDesc)
set obj1=Browser(oBrowser).Page(oPage).ChildObjects(oDesc1)
set obj2=Browser(oBrowser).Page(oPage).Object.All.tags("input")
set obj3=Browser(oBrowser).Page(oPage).Object.All.tags("TD")
'Numberobj=obj2.Count()
index=0
For Each Element in obj3
index = index + 1
'Msgbox Element.innerHTML 'Reading string between tags <td> of table
'Msgbox Element.maxlength
Next

'msgBox obj2.ToString()
For i=0 to Numberobj-1
'msgBox obj2(i).ToString()
Next
NumberOfEdits = obj.Count()
NumberOfButton = obj1.Count()
'msgbox NumberOfEdits
Dim A(20)
Set fso = CreateObject("Scripting.FileSystemObject")
For i = 0 To NumberOfEdits-1
If (fso.FileExists("E:\TestData\Input.xls")) Then
DataTable.Import "E:\TestData\Input.xls"
End if
datatable.getsheet(1)
obj(i).Set datatable.value(datatable.GetSheet(1).GetParameter(i+1).Name,1)
'msgBox obj(i).ToString()
Next
Wait(10)
index=0
For Each Element in obj2
Wait(2)
If Element.Type="button" and Element.name="Send" then
'msgbox Element.Type
'msgbox Element.name

obj2(index).Click

Data input.xsl

PHP Code:
name    address     phone      email                     title          content
Null        Test     234234  test
@yahoo.com   test        test
Test1     Test1      345435  test
@yahoo.com   test             test
Test     Test       234236  test
@yahoo.com   test      test 

name was compelled data to have.
When i was submmited button "Send" then a popup dialog messager but i want continue test run. How I must resolve this Problem?



RE: Problem Pop-up - Saket - 10-03-2009

I think you are getting error at the statement-
Code:
obj2(index).Click
Can you attach the snapshot of your error?
are you getting error as 'Subscript out of range....'
if so check you have the object at the position you are looking for.
may be I am wrong,I can see the value for 'index' is increased for no reason
Code:
For Each Element in obj3
index = index + 1
'Msgbox Element.innerHTML 'Reading string between tags <td> of table
'Msgbox Element.maxlength
Next

does this help?


RE: Problem Pop-up - basanth27 - 10-04-2009

Answer to your Question : Use Recovery Scenarios.


RE: Problem Pop-up - bebeo - 10-05-2009

I used Recovery Scenarios
obj2(index).Click still action
I want question when obj2(index).Click active then a popup dialog messager display but i want continue test run. How I must resolve this Problem?


RE: Problem Pop-up - basanth27 - 10-05-2009

How did you use the recovery scenario ? ?Can you please explain clearly.?