Clicking on a HTML dropdown list doesn't drop the list

2 posts, 0 answers
  1. hasantha
    hasantha avatar
    9 posts
    Member since:
    Jun 2014

    Posted 17 Jun 2014 Link to this post

    We have hybrid android mobile application. In a certain UI(html file) in the application, there's a drop-down menu which needs to be clicked(automated) using a test script. I tried using  web.tap() and web.click(), but the drop-down list didn't drop as it should do. I couldn't find any other methods specifically made to perform an click operation/event on a dropdown list in this http://docs.telerik.com/platform/mobile-testing/api-reference/web page(Web API) . How do you achieve this?
  2. Shtilianov
    Admin
    Shtilianov avatar
    6 posts

    Posted 20 Jun 2014 Link to this post

    Hi hasantha,

    Thank you for bringing this issue to us.

    Can you try if the following will work on your side:

    setSelectedValue should open the dropdown and select the item from the dropdown by its name as a string.
    // the dropdown element
    var dropdown = { 'id' : 'dropdown' };
     
    web.setSelectedValue(dropdown, "value"),
    // now for the verification, getSelectedValue should return the selected item as a string which can be asserted
     
    web.getSelectedValue(dropdown, function(res){
         assert(res).equals("value");

    I hope it helps.

    Regards,
    Shtilianov
    Telerik
     
    Test your Android and iOS apps against any device or browser with Telerik Mobile Testing. Part of the Telerik Platform.
     
Back to Top