Class CdpResponse

java.lang.Object
io.karatelabs.driver.cdp.CdpResponse

public class CdpResponse extends Object
Wrapper for Chrome DevTools Protocol responses with JSONPath extraction.
  • Constructor Details

  • Method Details

    • getId

      public int getId()
    • isError

      public boolean isError()
    • getError

      public Map<String,Object> getError()
    • getErrorMessage

      public String getErrorMessage()
    • getErrorCode

      public Integer getErrorCode()
    • getResult

      public Map<String,Object> getResult()
    • getRaw

      public Map<String,Object> getRaw()
    • getResult

      public <T> T getResult(String path)
      Get value from result using JSONPath. Example: getResult("frameId") or getResult("result.value")
    • getResultAsString

      public String getResultAsString(String path)
      Get value from result as String.
    • getResultAsInt

      public Integer getResultAsInt(String path)
      Get value from result as Integer.
    • getResultAsBoolean

      public Boolean getResultAsBoolean(String path)
      Get value from result as Boolean.
    • get

      public <T> T get(String path)
      Get value from any part of response using JSONPath.
    • toString

      public String toString()
      Overrides:
      toString in class Object