<WebElement>.isEnabled() throws a exception (java.lang.Long cannot be cast to java.lang.Boolean)

213 views
Skip to first unread message

neet...@gmail.com

unread,
Mar 4, 2013, 6:17:08 AM3/4/13
to appium-...@googlegroups.com

I started to use appium and writing tests in java using selenium. When I tried doing the below, I found the error
WebElement newButton = driver.findElement(By.name("adInit"));
Assert.assertTrue(newButton.isEnabled, "The button was enabled");

The newButton.isEnabled() is giving back a long value as 1 and is not able to convert from long to boolean.

The appium logs show

Responding to client with success: {"status":0, "value":1, "sessionId":"bf6c....."}

The value passed from the client is 1 but is expecting true.

Any idea how I verify if the button is enabled?

Jonathan Lipps

unread,
Mar 5, 2013, 11:11:28 PM3/5/13
to neet...@gmail.com, appium-...@googlegroups.com
Hi,

I just committed a change which hopefully converts these values to booleans. Please try again and let us know if it works!

Jonathan

--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

neet...@gmail.com

unread,
Mar 11, 2013, 12:20:06 AM3/11/13
to appium-...@googlegroups.com, neet...@gmail.com
Thanks. It works.

Neetha

Tomek

unread,
Jul 11, 2013, 7:36:18 AM7/11/13
to appium-...@googlegroups.com, neet...@gmail.com
It lloks like on new Appium.app i notcie also this issue
Reply all
Reply to author
Forward
0 new messages