Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WebEdit box
#1
Not Solved
I am using the following:

Code:
blFlagM4 =  .WebEdit("RepCode").Exist(0)
Even though the RepCode is not found (by my eye) the flag always gets set to True.

So I tried:

Code:
blFlagM4 =  .WebEdit("RepCode", "visible:=True").Exist(0)

But this errors out.

How can i change:
Code:
blFlagM4 =  .WebEdit("RepCode").Exist(0)
so that it wont come up as True if RepCode is really not there? lol
Reply
#2
Not Solved
Hey lorena,
do u say it is hidden , but it still returns true?

If yes,
Code:
If Browser().Page().WebEdit().GetROProperty("x") = 0 and Browser().Page().WebEdit().GetROProperty("y") = 0  then
         ' it is hidden. but qtp will still return as true. so add ur code here

Else
          ' it is not hidden. so lets highlight where it is
            Browser().Page().WebEdit().highlight
End If
Reply
#3
Not Solved
Hi,

Instead of checking for .Exist() go for the property to check if it is hidden or not because sometimes object are not visible but they are hidden, I also face the same problem in one of my application.

Regards,
Sankalp
Reply
#4
Not Solved
Thx vIns and you to Sankalp. But these did not work

This is a cut of my code (notice the flags dont match but the acrually do elsewhere)

-------------
Code:
blFlagD3 = .WebElement("Branch").Exist(0)
blFlagE1 = .WebElement("WebTable_AccountNo").Exist(0)
blFlagE2 = .WebElement("StartDate").Exist(0)
blFlagE3 = .WebCheckBox("CheckboxSave1").Exist(0)
blFlagE4 = .WebList("Select_Start_Month").Exist(0)
blFlagF1 = .WebElement("WebTable_AccountNo").Exist(0)
blFlagF2 = .WebElement("Select Tax Year").Exist(0)
blFlagF3 = .WebList("Select_Tax_Year").Exist(0)
blFlagG1 = "ALL IMAGED CLIENT DOCUMENTS"
blFlagH1 = .WebElement("WebTable_ImageAccess").Exist(0)
blFlagH2 = .WebEdit("SubFirm").Exist(0)
blFlagH3 = .WebElement("StartDate").Exist(0)
blFlagH4 = .WebElement("Branch").Exist(0)
blFlagJ1 = "ALL DOCUMENTS BY ACCOUNT TYPE"

blFlagI1 = .WebTable("Image Access_2").Exist(0)
blFlagI2 = .WebEdit("SubFirm").Exist(0)
blFlagI3 = .WebElement("Branch").Exist(0)
blFlagI4 =  .WebEdit("StartDate").Exist(0)
blFlagI5 =  .WebEdit("EndDate").Exist(0)



'Check for Errors or Missing Data
Call ErrorChecking (SectionLink, GroupName, ReportName, absX, absY, ExitFunction, GrC)
        If ExitFunction = 1 Then
            Exit Function
        End If

Wait (1)
'Search Preference Dialog Box K -- Like "INVENTORY REPORT BY SUB/INV NO"
        If blFlagK1="True" AND blFlagK2="True" AND blFlagK3="True" AND blFlagK4="True" AND blFlagK5="True" AND blFlagK6="True" Then
                Call NegativeDateTestingWith2DateThenAddDate (GroupName, ReportName, absX, absY, "K")
                'Call ReportK (SectionLink, GroupName, ReportName, absX, absY, GrC) 'NOT CREATED YET
                Call CloseDialogBox
                Exit Function
        End If

'Search Preference Dialog Box L -- Like "Branch Reporting"
        If blFlagL1="True" AND blFlagL2="True" AND blFlagL3="True" AND blFlagL4="True" AND blFlagL5="True" AND blFlagL6="True" Then
                Call NegativeDateTestingWith2DateThenAddDate (GroupName, ReportName, absX, absY, "L")
                'Call ReportL (SectionLink, GroupName, ReportName, absX, absY, GrC) 'NOT CREATED YET
                Call CloseDialogBox
                Exit Function
        End If

'Search Preference Dialog Box M -- Like "TRADE BLOTTER REPORTS BY ACCOUNT"  *** **  same a Report I   ???
        If blFlagM1="True" AND blFlagM2="True" AND blFlagM3="True" AND blFlagM4="True" AND blFlagM5="True" AND blFlagM6="True" Then
'                Call NegativeDateTestingWith2DateThenAddDate (GroupName, ReportName, absX, absY, "M")
'                Call ReportM (SectionLink, GroupName, ReportName, absX, absY, GrC) 'NOT CREATED YET
                Call CloseDialogBox
                Exit Function
        End If
-------------

For report M, all 5 flags get set even though flag 4 is not seen or found on the dialog box.

see attachment ;-)


Attached Files
.pdf   Setting all M flags when it should not..pdf (Size: 34.72 KB / Downloads: 86)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to compare a certain text inside a WebEdit box? chong67 2 3,070 08-24-2012, 12:32 PM
Last Post: Ankesh
  how to automate webedit box ricks_ngl 1 2,541 07-24-2012, 12:55 PM
Last Post: K Gaurav Varshney
  Default value in Edit Box when Check Box is checked nacchio 2 5,092 07-18-2012, 12:21 PM
Last Post: sree.85
  whie box and black box test kiran10_rm 1 2,464 12-07-2010, 01:29 AM
Last Post: duggisrinivasarao
  How to do a paste (Ctrl+V) in a webedit box pvinay 1 6,054 02-19-2010, 02:44 AM
Last Post: wheelercha

Forum Jump:


Users browsing this thread: 1 Guest(s)