Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
to check if an item in the list is disabled or not
#7
Not Solved
Hi Sujaravi,

What happens when you try to select a disabled option? Any other enabled option gets selected? If this is the case you might try Ravi's code as below:

Code:
allItems=split(Browser("title:=Find a Flight.*").Page("title:=Find a Flight.*").WebList("name:=fromPort").GetROProperty("all items"),";")

For i=0 to uBound(allItems)
  
  Browser("title:=Find a Flight.*").Page("title:=Find a Flight.*").WebList("name:=fromPort").Select  allItems(i)
  strSelection=Browser("title:=Find a Flight.*").Page("title:=Find a Flight.*").WebList("name:=fromPort").GetROProperty("selection") //you can also use "value" instead of selection

If  StrComp(strSelection,allItems(i)) = 0 Then
Reporter.ReportEvent micDone,"Status of "&"allItems(i), "Enabled"
Else
Reporter.ReportEvent micDone,"Status of "&"allItems(i), "Disabled"
End If
Next
Reply


Messages In This Thread
RE: to check if an item in the list is disabled or not - by PrabhatN - 12-13-2011, 08:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is VBScripting disabled in Office 365 update? soumyarani 0 1,527 12-19-2020, 12:37 PM
Last Post: soumyarani
  How to select item within WebMenu learnasugo 4 8,106 10-11-2016, 03:35 PM
Last Post: learnasugo
  Compare second web list value according to the first web list value roselin6 1 2,838 10-07-2015, 09:14 PM
Last Post: supputuri
  Disabled Webelement is showing up as Visible =True in GUI Spy Shwethareddy 3 3,837 11-07-2012, 02:45 PM
Last Post: Ankesh
  How to select a particular check box from a list umer830 6 31,089 10-23-2012, 12:20 PM
Last Post: vjjohnson04

Forum Jump:


Users browsing this thread: 2 Guest(s)