This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
1 / 7
Aug 2017

Using javascript binding of appium
I am trying to select the time from time picker using the xpath as follows(selecting 1 in this case):

await driver.waitForElementByXPath("//android.widget.RadialTimePickerView$RadialPickerTouchHelper[contains(@content-desc,'1')]", asserters.isDisplayed, 10000).click();

But getting error -
[waitForElementByXPath("//android.widget.RadialTimePickerView$RadialPickerTouchHelper[contains(@content-desc,'1')]",{},10000)] [elements("xpath","//android.widget.RadialTimePickerView$RadialPickerTouchHelper[contains(@content-desc,'1')]")] Error response status: 32, , InvalidSelector - Argument was an invalid selector (e.g. XPath/CSS). Selenium error: Argument was an invalid selector (e.g. XPath/CSS).

  • created

    Aug '17
  • last reply

    Oct '18
  • 6

    replies

  • 1.1k

    views

  • 4

    users

  • 1

    like

@Aleksei tried @contentDescription and got the same error-

[waitForElementByXPath("//android.widget.RadialTimePickerView$RadialPickerTouchHelper[contains(@contentDescription,'2')]",{},10000)] [elements("xpath","//android.widget.RadialTimePickerView$RadialPickerTouchHelper[contains(@contentDescription,'2')]")] Error response status: 32, , InvalidSelector - Argument was an invalid selector (e.g. XPath/CSS). Selenium error: Argument was an invalid selector (e.g. XPath/CSS).

this is problematic for xPath. try to see same your pageSource and check is it “android.widget.RadialTimePickerView$RadialPickerTouchHelper” or maybe “android.widget.RadialTimePickerView” ?

1 year later

You can use the below code with xpath.

driver.findElement(By.xpath("//*[@content-desc=‘5’]"));

1 month later

Did you find any solution for this. I’m facing same problem