Search in sources :

Example 1 with MobileElementDTO

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;
}
Also used : MobileElement(com.testsigma.automator.actions.mobile.MobileElement) MobileElementDTO(com.testsigma.agent.dto.MobileElementDTO)

Aggregations

MobileElementDTO (com.testsigma.agent.dto.MobileElementDTO)1 MobileElement (com.testsigma.automator.actions.mobile.MobileElement)1