2016-11-02 3 views
0

내가 HTML 코드에서이 슬라이더 입력이 있습니다Slider Input에 값을 설정하는 적절한 방법은 무엇입니까? (각도기 자동화)

enter image description here

enter image description here

(죄송합니다,이 이미지 것에 대해, 나는 페이지의 코드에 액세스 할 수없는, 나는 그것을 시험해야한다).

this.maxdivedepth = function (value) { 
    var slider = util.getElementAsyncSafe(by.id("maximum-dive-depth")); 
    browser.actions().dragAndDrop(
      slider, 
      {x: value, y: 0} 
    ).mouseUp().perform(); 
}; 

'값' "100"예를 들어 인 :

와 나는이 코드를 시도하고있다.

나는 여전히 같은 예를 들어 개의 다른 선택기를 사용하여 몇 가지를 시도했지만 ..

터미널 오류가 표시되지 않습니다,하지만 난 아무것도 슬라이더를 볼 수 없습니다.

아무도 도와 줄 수 있습니까?

답변

0

먼저 슬라이더에 표시된 원 요소의 로케이터를 식별해야합니다. 그런 다음 아래 코드를 사용하여 드래그 할 수 있습니다.

var slider = $(".rz-pointer-min"); //im not sure about the locator of the circle element. 
browser.actions().mouseMove(slider).mouseDown().mouseMove({x:20,y:0 }).mouseUp().perform()