Support For kendo controls: Not able to set Kendo control drop down value, since it is renderd as UIAStatic Text

Hi,

i am new to appium, have setup appium for automation.
i am facing the following issue:
How to select a value for drop down( kendo control). this drop down is kendo control ( kendo renders the control in custom format. this control is combination of multiple HTML controls).
since this dropdown is render as UIAStaticText , i am not able to set the value for this drop down.
could you please help to identify this as drop down?
is there any way to convert this control to dropdown

Control:

My code:
Select dropdown = new Select(driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIAScrollView[1]/UIAWebView[1]/UIAStaticText[7]")));
dropdown.selectByIndex(1);
Thread.sleep(5000);
Error:

FAILED: Mytest1
org.openqa.selenium.support.ui.UnexpectedTagNameException: Element should have been “select” but was “UIAStaticText”
Build info: version: ‘2.43.1’, revision: ‘5163bce’, time: ‘2014-09-10 16:27:33’
System info: host: ‘QAs-Mac-mini.local’, ip: ‘10.47.86.154’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.10’, java.version: ‘1.8.0_20’
Driver info: driver.version: unknown

Hi @souji,

Select dropDown = new Select(driver.findElement(By.xpath("//UIAStaticText[@label=‘All Stations’]")));//or you can use “//UIAStaticText[@name=‘All Stations’];”
dropdown.selectByIndex(1);

Hope this helps you , Please let me know if you’re able to done with the same.

Thanks,
Vijay Bhaskar.

Hi bhaskar,

thanks for the reply.

i tried as you said, but did not help. i am getting “SessionNotFoundException”
tried with both label and name
CODE:
Thread.sleep(50000);
Select dropdown = new Select(driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIAScrollView[1]/UIAWebView[1]/UIAStaticText[@name =‘All Stations’]")));
dropdown.selectByIndex(1);

Hi @souji ,
I guess Select class mayn’t work for your case…Please try with click on that element by using driver.findElement(By.xpath("//UIAStaticText[@label=‘All Stations’]")).click(); and again perform click on option Element.

Thanks,
Bhaskar.

1 Like

HI bhaskar,

Thanks !!! your solution worked for me :smile:

this works !!!
driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIAScrollView[1]/UIAWebView[1]/UIAStaticText[7]")).click();
driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIAScrollView[1]/UIAWebView[1]/UIAElement[2]")).click();

1 Like

That sounds great :+1: Good work !!!

Regards,
Bhaskar.