Haben Sie jemals versucht, die Action
-Schnittstelle?
sollte Besonders Sie den Punkt "generieren Aktionsketten"
/**
* Moves a jQuery slider to percental position, don't care about directions
* @param slider to move
* @param percent to set the slider
*/
public void moveSliderToPercent(WebElement slider, int percent){
Actions builder = new Actions(this.driver);
Action dragAndDrop;
int height = slider.getSize().getHeight();
int width = slider.getSize().getWidth();
if(width>height){
//highly likely a horizontal slider
dragAndDrop = builder.clickAndHold(slider).moveByOffset(-(width/2),0).
moveByOffset((int)((width/100)*percent),0).
release().build();
}else{
//highly likely a vertical slider
dragAndDrop = builder.clickAndHold(slider).moveByOffset(0, -(height/2)).
moveByOffset(0,(int)((height/100)*percent)).
release().build();
}
dragAndDrop.perform();
}
beziehen helfen - http://stackoverflow.com/questions/11966287/unable-to-control-slider-captcha-jquery-using-selenium -webdrive/12050145 –