Please can some one help me to write script for popup windows for redbus


The url is
I am struck on sign up popup..I don’t know how to write script for login using the google

Add Comment
1 Answer(s)
Best answer

Hi? I have written completed test class for you.
//navigate to index page.

//click on signIn link.
WebElement signInLink = driver.findElement(“signInLink”));;

//Switch to last iframe, and some wait until page loaded all frames, but no more than 10 sec.
List<WebElement> frames;
try {
}catch (InterruptedException e){}

frames = driver.findElements(By.tagName(“iframe”));


//Select google.
WebElement googleButton = driver.findElement(“googlePlusBtn”));;

//Switch to last window.
for (String win:driver.getWindowHandles()){
//Verify redirect to the google authorization window.


If you have some questions just ask)

Wait for feedback.

victor Reviewer Answered on July 9, 2015.

It’s working fine. I got the concept now….Thank you so much victor

on July 10, 2015.

you are welcome)

on July 10, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.