Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How To Find Dropdown Object based on Values from the dropdown list
#11
Solved: 10 Years, 8 Months, 4 Weeks ago
(05-18-2012, 06:29 PM)mesg2anil Wrote: Hi,

I'm having difficulty scripting for below situation...

I have a dropdown list, in the dropdown list I've values as below...
one
two
three
four
five

I want to find the dropdown object exists or not based on the dropdown list values as shown above. How to find the object? Please help!!

Regards,
Anil

Hi you can use the Excel,You can matching the value with application drop down value to Excel input value:

Function DropDownValidation(Str_ExcelPath)
    
Str_ExcelPath= "C:\Users\chvijay\Desktop\SDB_Dropdwon list_5.0.xlsx"
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.WorkBooks.Open(Str_ExcelPath)
Set objDriverSheet = objWorkbook.Worksheets("witholding-tax-code")
count_rows=objDriverSheet.usedrange.rows.count
 DropDownItems=Browser("INTEGRATION").Page(INTEGRATION").WebList("frm:tabView:integratedLocalAcc_5").GetROProperty("all items")
 Str_Result=split(DropDownItems,";")

For i = 0 To UBound(Str_Result) Step 1
    finelresult=Str_Result(i)
    finelresult1=finelresult1&" "&finelresult
    Next
    print "Item In Drob Down"&"-"&finelresult1
        For j= 2 To count_rows Step 1
        read_Value_Excel= objDriverSheet.cells(j,1).value
         print "ReadValue From Excel"&" "&read_Value_Excel

        If ucase(trim(instr(finelresult1,read_Value_Excel)>0))Then
            objDriverSheet.cells(j,5)="Available"
            DropDownValidation=true
         else

            objDriverSheet.cells(j,5)="Not Available"
            'MsgBox "Not Write"
           DropDownValidation=False
        End If
    Next
    
    objWorkbook.Save
    wait 2
    objExcel.Quit
Reply


Messages In This Thread
RE: How To Find Dropdown Object based on Values from the dropdown list - by vijaychourasiya0109@gmail.com - 09-14-2017, 04:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to select value from google search box dropdown +QTP prajyot 0 2,671 06-28-2017, 06:30 PM
Last Post: prajyot
  Trying to create List box in excel sheet at Run time with values yes No JACKSPARROW 0 1,590 01-17-2017, 11:05 AM
Last Post: JACKSPARROW
  General Object Error(Find Object Error) akhandesh 1 3,412 02-24-2016, 01:05 PM
Last Post: sindhus
  Compare second web list value according to the first web list value roselin6 1 2,644 10-07-2015, 09:14 PM
Last Post: supputuri
  Problem selecting in a dropdown menu during playback. qemls29 9 12,456 07-28-2015, 05:44 PM
Last Post: Sharan

Forum Jump:


Users browsing this thread: 1 Guest(s)