Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If statement with multiple conditions
#1
Solved: 11 Years, 4 Months ago
I need to check multiple of objects to determine which type of Preference dialog box was displayed. Can I use:

Code:
With Browser("Fax Request").Page("Preferences")

Code:
If (.WebElement("WebTable").Exist and .WebEdit("StartDate").Exist and .WebElement("mm/dd/yyyy").Exist and .WebCheckBox("CheckboxSave").Exist Then
...?
Reply
#2
Solved: 11 Years, 4 Months ago
Hai Lorena,

If Possible please try this....

Code:
If Browser("Fax Request").Page("Preferences").WebElement("WebTable").Exist then
  
        If Browser("Fax Request").Page("Preferences").WebEdit("StartDate").Exist then

               If Browser("Fax Request").Page("Preferences").Web.....

               End If

        End If

   End If

Makes sense? Reply me if you have another logic.

Thanks,
Saranya
Reply
#3
Solved: 11 Years, 4 Months ago
I will try your idea. Thx! I had thought about t6his but I was worried it would become a big mess. But my current way takes a long time for each multiple exist. Almost a minute per If statement. This is wayb to slow. I need the Prefrence page to be checked much faster. I will let you nknow how it goes.

Lor
Reply
#4
Solved: 11 Years, 4 Months ago
I tried your suggestion, but it is still as slow as before. Maybe I will try using Exist(0)?
Reply
#5
Solved: 11 Years, 4 Months ago
Lorena,
Try This
Code:
Dim oDialog:set oDialog=Dialog("text:=Login")

set obj1=description.Create()
set obj2=description.Create()
obj1("Micclass").Value="WinEdit"
obj2("Micclass").Value="WinButton"
set oCount=oDialog.Childobjects(obj1)
set oCount1=oDialog.Childobjects(obj2)
'Msgbox oCount
's=oCount.Coun
     If oCount.Count=1 then
         Msgbox"Editbox is exist"
    End if    
    If oCount1.Count=0 then
         Msgbox"Button is exist"
    End if


Thanks,
Arul.D
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Correcting If statement looking for multiple strings mv8167 5 5,613 11-03-2011, 11:51 AM
Last Post: ravi.gajul
  exit conditions stevol 0 1,953 08-11-2008, 03:35 PM
Last Post: stevol

Forum Jump:


Users browsing this thread: 5 Guest(s)