Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to select from a dropdown list showing as an webelement?
#1
Solved: 7 Years, 9 Months ago
I want to select the particular country dynamically from the drop down list appearing as a web element.
There is no major difference in the property except x-path and coordinates for the different country showing in the dropdown list.

Below the property for a particular dropdown county:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
"Class Name:=WebElement",
"abs_x:=414",
"abs_y:=564",
"class:=",
"height:=12",
"html id:=",
"html tag:=DIV",
"innerhtml:=",
"innertext:=",
"outerhtml:=<div style=""left: 0px; top: 0px; width: 181px; height: 12px; border-right-color: rgb\(220, 220, 220\); border-left-color: rgb\(220, 220, 220\); border-right-width: 1px; border-left-width: 0px; border-right-style: solid; border-left-style: solid; position: absolute; z-index: 1;"" unselectable=""on""></div>",
"outertext:=",
"role:=",
"title:=",
"type:=",
"visible:=True",
"width:=181",
"x:=414",
"xpath:=//DIV\[@id=""DS""\]/DIV\[1\]/DIV\[1\]/DIV\[1\]/DIV\[4\]/DIV\[1\]",
"y:=510"
++++++++++++++++++++++++++++++++++++++++

I have tried the below code snippet that is working dynamically sometime but each time x-path changed for a particular country showing in the dropdown list and then the code snippet is not working, selecting the different country.

 Set obj = Description.Create()
 obj("micclass").Value = "WebElement"
 obj("html tag").Value = "DIV"
    For i = 0 to strCount-1 
        strPpty = objWE(i).GetROProperty("xpath")
        If strPpty = "//DIV[@id=""DS""]/DIV[1]/DIV[1]/DIV[1]/DIV[35]/DIV[1]" Then
            Browser("QlikView").Page("EMD Plus Analytics_Dev.qvw").WebElement("xpath:="& strPpty &"").Click
            Exit For
        End If
    Next

Please suggest how I can select a particular country from the drop down list.

attaching the screenshot of the application.


Attached Files Image(s)
   
Reply
Jump to the post that solved this thread.


Messages In This Thread
how to select from a dropdown list showing as an webelement? - by smukherjee - 04-20-2016, 06:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Dropdown Value wahab usman 2 3,930 07-23-2012, 06:16 PM
Last Post: Tarik Sheth
  need help --- for clicking on function its showing error message umaenc 4 3,510 07-19-2012, 11:03 AM
Last Post: umaenc

Forum Jump:


Users browsing this thread: 1 Guest(s)