Regarding Frames

In my application clicking on feature displays the contents in frame and i am able to access the contents by switching into frame.

Now in order to access some other application present in menu and  which is not in frame i am  unable to select the menu item and the sub item (My another application).

It is same as tools SQA site where i am able to access selenium under Tutorials and able to perform my application. but when i try to access Maven under tutorials i am unable to do  highlight on tutorials and from there to Maven.

sairam Default Asked on August 31, 2015 in Selenium WebDriver.
Add Comment
2 Answer(s)

package mouse_event;

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.interactions.Actions;

public class Classic {

public static void main(String[] args)
{
System.setProperty(“webdriver.chrome.driver”, “C:\\Program Files (x86)\\Java\\jre1.8.0_31\\lib\\selenium-java-2.46.0\\selenium-2.46.0\\chromedriver.exe”);
WebDriver driver = new ChromeDriver();
driver.get(“http://www.toolsqa.com/”);
System.out.println(driver.getTitle());
Actions act = new Actions(driver);
WebElement elem = driver.findElement(By.linkText(“TUTORIALS”));
act.moveToElement(elem).build().perform();
try
{
Thread.sleep(2000);
}
catch(InterruptedException e)
{
e.printStackTrace();
}
WebElement selenium_link = driver.findElement(By.linkText(“Selenium”));
act.moveToElement(selenium_link).build().perform();
try
{
Thread.sleep(2000);
}
catch(InterruptedException e)
{
e.printStackTrace();
}
selenium_link.click();
try
{
Thread.sleep(2000);
}
catch(InterruptedException e)
{
e.printStackTrace();
}
driver.navigate().back();
try
{
Thread.sleep(2000);
}
catch(InterruptedException e)
{
e.printStackTrace();
}
WebElement elem1 = driver.findElement(By.linkText(“TUTORIALS”));
act.moveToElement(elem1).build().perform();
try
{
Thread.sleep(2000);
}
catch(InterruptedException e)
{
e.printStackTrace();
}
WebElement maven_link = driver.findElement(By.linkText(“Maven”));
act.moveToElement(maven_link).build().perform();
try
{
Thread.sleep(2000);
}
catch(InterruptedException e)
{
e.printStackTrace();
}
maven_link.click();
driver.close();
}
}

BhavinR Train Answered on September 4, 2015.
Add Comment

package mouse_event;

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.interactions.Actions;

public class Classic {

public static void main(String[] args)
{
System.setProperty(“webdriver.chrome.driver”, “C:\\Program Files (x86)\\Java\\jre1.8.0_31\\lib\\selenium-java-2.46.0\\selenium-2.46.0\\chromedriver.exe”);
WebDriver driver = new ChromeDriver();
driver.get(“http://www.toolsqa.com/”);
System.out.println(driver.getTitle());
Actions act = new Actions(driver);
WebElement elem = driver.findElement(By.linkText(“TUTORIALS”));
act.moveToElement(elem).build().perform();
try
{
Thread.sleep(2000);
}
catch(InterruptedException e)
{
e.printStackTrace();
}
WebElement selenium_link = driver.findElement(By.linkText(“Selenium”));
act.moveToElement(selenium_link).build().perform();
try
{
Thread.sleep(2000);
}
catch(InterruptedException e)
{
e.printStackTrace();
}
selenium_link.click();
try
{
Thread.sleep(2000);
}
catch(InterruptedException e)
{
e.printStackTrace();
}
/*driver.navigate().back();
try
{
Thread.sleep(2000);
}
catch(InterruptedException e)
{
e.printStackTrace();
}*/
WebElement elem1 = driver.findElement(By.linkText(“TUTORIALS”));
act.moveToElement(elem1).build().perform();
try
{
Thread.sleep(2000);
}
catch(InterruptedException e)
{
e.printStackTrace();
}
WebElement maven_link = driver.findElement(By.linkText(“Maven”));
act.moveToElement(maven_link).build().perform();
try
{
Thread.sleep(2000);
}
catch(InterruptedException e)
{
e.printStackTrace();
}
maven_link.click();
/* driver.close();*/
}
}

BhavinR Train Answered on September 4, 2015.
Add Comment

Your Answer

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