Lorem Ipsumは印刷業界や植字業界のダミーテキストです。 Lorem Ipsumは、未知のプリンタがタイプのギャレーを取り、型式の本を作るためにそれをスクランブルした1500年代以来、業界標準のダミーテキストでした。セレン2を使用してページを下にスクロールできません
package PackageQandle;
//import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebElement;
//import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
//import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
//import junit.framework.Assert;
public class Adduser {
public static void main(String[] args) throws Throwable {
System.setProperty("webdriver.gecko.driver","C:/Users/sudhir/geckodriver-v0.18.0-win32/geckodriver.exe");
FirefoxDriver driver = new FirefoxDriver();
driver.get("https://prod4.qandle.com");
WebDriverWait webwait = new WebDriverWait(driver,120);
webwait.until(ExpectedConditions.elementToBeClickable(driver.findElementByXPath(".//*[@id='login-email']")));
WebElement web = driver.findElementByXPath(".//*[@id='login-email']");
web.sendKeys("[email protected]");
WebDriverWait webwait1 = new WebDriverWait(driver,20);
webwait1.until(ExpectedConditions.elementToBeClickable(driver.findElementByXPath(".//*[@id='login-password']")));
WebElement web1 = driver.findElementByXPath(".//*[@id='login-password']");
web1.sendKeys("Abc12345");
WebElement web2 = driver.findElementByXPath(".//*[@id='signInSubmit']");
web2.submit();
//Assert.assertEquals(my_Title, my_ExpectedTitle);
Thread.sleep(5000);
//JavascriptExecutor j = new JavascriptExecutor();
String my_Title = driver.getCurrentUrl();
//System.out.println(my_Title);
String my_ExpectedTitle = "https://prod4.qandle.com/#/";
if(my_Title.equals(my_ExpectedTitle)){
driver.executeScript("Scroll(0,600);");
}else{
System.out.println("Test Case Failed");
}
}
}
I am using this code to inspect element which appears when i scroll down
the page.So help me in this and provide me solution.I have tried it with so many solutions.
私も..それも動作していないthis..butを介して行わ –