2013-10-14 2 views
0

div를 사용하여 양식을 가져올 수 있도록 다음 특수 문자를 이스케이프 처리하려면 어떻게해야합니까? 이건 내 cssSelector입니다 :cssSelector 웹 드라이버에서 특수 문자 이스케이프

#form > div:nth-child(4)>div:nth-child(2) > div:nth-of-type(2) > div:nth-of-type(2) 

그리고 이것은 HTML 코드입니다 :

div id="form:panelGridTransactionInfo" class="ui-panel ui-widget ui-widget-content ui-corner-all" 

감사

답변

4

당신과 같이 백 슬래시로 이스케이프 : 자바에서

#form\:panelGridTransactionInfo > div:nth-child(4) > div:nth-child(2) > div:nth-of-type(2) > div:nth-of-type(2) 

, 문자열 내에서 자체를 이스케이프하려면 백 슬래시를 반복하십시오.

"#form\\:panelGridTransactionInfo > div:nth-child(4) > div:nth-child(2) > div:nth-of-type(2) > div:nth-of-type(2)"