CodePudding user response:
Who knows not codeCodePudding user response:
PhantomJSDriver driver=new PhantomJSDriver (desiredCapabilities);Driver. The get (" https://www.baidu.com ");
Dimension Dimension=new Dimension (Toolkit. GetDefaultToolkit () getScreenSize ());
Int width=(int) dimension. GetWidth ();
Int height=(int) dimension. GetHeight ().
Float per=1.5 f;
Width=(int) (width * per);//1920;;
Height=(int) (height * per);//1920;
WebElement input=driver. FindElement (By id (" kw "));
Input the clear ();
//input box input
Input the sendKeys (" Dallas electric vehicles ");
//by enter the keyboard instead of clicking
Input. SendKeys (Keys. ENTER);
Input. Click ();
WebElement su=driver. FindElement (By id (" su "));
Su. Click ();