Unable to use Select in Appium Studio

I am trying to automate Mobile Web, but i am not able to select a value from “Select” dropdown. This code works perfect in Appium, but not in Appium Studio.

Below is my code:

public String strAppURL="http://newtours.demoaut.com/";
	public String strUsername="udayanem";
	public String strPassword="V@ud@ynvu80";

DesiredCapabilities dc = new DesiredCapabilities();
	        dc.setCapability(SeeTestCapabilityType.REPORT_DIRECTORY, reportDirectory);
	        dc.setCapability(SeeTestCapabilityType.REPORT_FORMAT, reportFormat);
	        dc.setCapability(SeeTestCapabilityType.TEST_NAME, "Parabank Sample Test");
	        dc.setCapability(MobileCapabilityType.UDID, strDeviceName);
	        if(strBrowserName.equalsIgnoreCase("Chrome"))
	        	dc.setBrowserName(MobileBrowserType.CHROMIUM);
	        try 
	        {
				driver = new SeeTestAndroidDriver<>(new URL("http://"+host+":"+port), dc);
				
			} catch (MalformedURLException e) 
	        {
				e.printStackTrace();
			}


driver.get(strAppURL);
		System.out.println("Navigate to application URL '"+strAppURL+"'");
		Thread.sleep(5000);
		

		
		//SignIn into the application
		driver.findElementByXPath("//input[@name='userName']").sendKeys(strUsername);
		System.out.println("Enter username as '"+strUsername+"'");

			driver.findElementByXPath("//input[@name='password']").sendKeys(strPassword);
			System.out.println("Enter password as '"+strPassword+"'");
			driver.findElementByXPath("//input[@name='login']").click();
			System.out.println("Clicked on Sign In button");

				
	
		//Flight Finder
		driver.findElementByXPath("//input[@name='tripType' and @value='oneway']").click();
		System.out.println("Selected trip type as 'One Way'");
		
		WebElement meNoPassngers=driver.findElementByXPath("//select[@name='passCount']");
		Select noPassengers=new Select(meNoPassngers);
		noPassengers.selectByVisibleText("1");
		System.out.println("Selected number of Passengers as '1'");
            
            //To select also tried below code, but didnt help. When i tried this in Chrome it was shown as Radio button and didnt select and thrown an NoSuchElement error.
driver.findElementByXPath("//select[@name='passCount']").click();
			Thread.sleep(2000);
			driver.findElementByXPath("//option[contains(@text,'2')]").click();

Can someone look into it and suggest any work arounds.

Thanks,
Uday

Hi Uday

Sorry there is a known issue with Select in the version you are working with, we are just about to release the next version which fixes this issue, you’ll be notified via the tool in the next couple of days

Thanks for sharing

Tom

Till the fix is in place, is there any workaround for this problem?

Hi

Please download our latest version

http://d242m5chux1g9j.cloudfront.net/AppiumStudio_windows_10_8_32.exe
http://d242m5chux1g9j.cloudfront.net/AppiumStudio_macos_10_8_32.dmg

to help us verify the fix, can you kindly pull a temp driver from the repository?

group : com.experitest
Artifact ID : dror-appium
version : 10.8.2

Repo : http://repo.experitest.com:8010/
for more info :
https://docs.experitest.com/display/AS/Maven+Repository

Tom,

This is perfect. I reinstalled the updated version of Appium Studio and everything is working fine.

Thanks for your help and support.
Uday