Sometimes ExpectedConditions.elementToBeClickable will work instead of Visible check
[quote="qtpselenium.supp0rt@gmail.com":1r6v23kl]have you tried with fluent wait?[/quote:1r6v23kl]
Yes,I tried with FluentWait too.It didnt work.How come it is good with Thread.sleep() and not with explicit waits ?
Thanque.
[quote="Kannan":3l5mf9tq]Sometimes ExpectedConditions.elementToBeClickable will work instead of Visible check[/quote:3l5mf9tq]
I already tried with ExpectedConditions.elementToBeClickable kannan,didnt work.works good with Thread.sleep().
What error are you getting ???
by the way,I tried to execute your code on my machine and it is working.( my chrome Version 54.0.2840.99 m) I removed Implicit wait from your coding and also removed few commented lines... Can you try the below code
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
public class Frames_Paytm1 {
public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.chrome.driver", "D:\\latest-sw-downloads\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get("https://www.paytm.com");
WebDriverWait wait=new WebDriverWait(driver,30);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//div[@class='_3ac-']")));
driver.findElement(By.xpath("//div[@class='_3ac-']")).click();
System.out.println(driver.findElements(By.tagName("iframe")).size());
driver.switchTo().frame(0);
driver.findElement(By.xpath(".//*[@id='input_0']")).sendKeys("hello");
driver.findElement(By.xpath(".//*[@id='input_1']")).sendKeys("hello");
driver.switchTo().defaultContent();
}
}
My chrome Version is 54.0.2840.99 m, and using selenium 3.0.1
I tried modified code,didnt work
I got NoSuchFrameException,Obviously because there are no frames on homepage(frame exists after clicking signIn right)
Thanque for your time kannan.
may be i am asking too much info. but i need that
Please share the screenshot of the error and also run it in debug mode and share the step in which it is failing
1)Following is the error in debug perspective mode
Class File Editor
Source not found
the JAR file D:\-------\client-combined-3.0.1-nodeps.jar has no source attachment
you can attach the source by clicking attach source below
2) I didnt write code for capturing screenshot of error page yet
Thanque
[quote:4t07ap3e]the JAR file D:\-------\client-combined-3.0.1-nodeps.jar has no source attachment
you can attach the source by clicking attach source below
[/quote:4t07ap3e]
send me the screen shot of eclipse.