use of com.testsigma.agent.dto.MobileElementDTO in project testsigma by testsigmahq.
the class DriverSessionActionsController method getPageSource.
/**
* Gets the page source of the current page
*
* @param sessionId
* @return MobileElementDTO - A tree structure of page element
* @throws MobileAutomationServerCommandExecutionException
*/
@GetMapping(value = "/page_source", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public MobileElementDTO getPageSource(@PathVariable("session_id") String sessionId, @RequestParam("platform") Platform platform) throws MobileAutomationServerCommandExecutionException {
log.info("Request for page source in session - " + sessionId + " Platform - " + platform);
MobileElement mobileElement = driverSessionCommand.pageSourceElements(sessionId, platform);
MobileElementDTO mobileElementDTO = mobileElementMapper.map(mobileElement);
return mobileElementDTO;
}
Aggregations