0
votes

I am using Selenium webdriver . I want to select the "back " button of the firefox and right click the back button and select an option.

I see there is "Actions" API to right click, But i am not able to select/find the "back" button element of the firefox to right click using selenium .

Can any one please help me .

Code iam trying is :: Using firefox Driver to inittate the Webdriver

Actions action= new Actions(driver);
    action.contextClick(productLink).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.RETURN).build().perform();

In the above code , in place of "productlink", i should select the back button element of the firefox browser to right click .

2

2 Answers

0
votes

You cannot do that with Selenium.

You can use AutoIT with Selenium to click on that. Refer to the following article on how to use AutoIT. http://toolsqa.wpengine.com/selenium-webdriver/autoit-selenium-webdriver/

0
votes

Here is what you can do. Try to use "Navigation" Commands in selenium.

driver.navigate().to("http://www.DemoQA.com");

there are many commands you can perform on it. If you still find issues using it let me know.