Javascript XPath를 이용해서 Dom Element 가져오기
function getElementByXpath(path) {return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;}console.log( getElementByXpath("//html[1]/body[1]/div[1]") );
'Ep 01. B급 개발' 카테고리의 다른 글
HTML TO PDF with phantomjs (0) | 2018.05.13 |
---|---|
셀레니움을 통한 웹 테스트 준비 스크립트 (0) | 2018.05.13 |
Spring-boot RestAPI 와 Spring Security OAuth2 연동(spring-boot 1.5.10 기준) (0) | 2018.05.13 |
Technical writing에 관하여_1 (0) | 2018.03.07 |