java.lang.ClassCastException

com.alibaba.fastjson.JSONObject cannot be cast to java.lang.String

Solutions on the web19440

  • via GitHub by Archer456
    , 9 months ago
    com.alibaba.fastjson.JSONObject cannot be cast to java.lang.String
  • java.lang.String cannot be cast to com.alibaba.fastjson.JSONObject
  • via GitHub by zsmjluo
    , 1 month ago
    java.lang.String cannot be cast to com.alibaba.fastjson.JSONObject
  • Stack trace

    • java.lang.ClassCastException: com.alibaba.fastjson.JSONObject cannot be cast to java.lang.String at macaca.client.commands.Element.getText(Element.java:83) at macaca.client.MacacaClient.text(MacacaClient.java:934) at uiauto.H5MobileTest.test_case_1(H5MobileTest.java:55)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You are the first who have seen this exception. Write a tip to help other users and build your expert profile.