Post

1 Star2 Stars3 Stars4 Stars5 Stars

By Rafaela Azevedo
Hello !!

Do you need simulate a context click (right-click) in some element ?
With the lib actions is simple. First you need import the actions of java and after

Actions actions = new Actions(driver); //Instance the Actions
WebElement Element = driver.findElement(By.id(“ID“)); // find the element and put is in a variable
actions.ContextClick(Element).Perform(); // position the mouse over the element and context click it.

Just this, in some cases you have put a speed more lower or a wait element os something like that to work well.

Bye bye !!

Source: http://azevedorafaela.wordpress.com/2013/04/23/context-click-with-actions-webdriver/

Category: Programming, QA, Test and Automation Stuffs, actions, context click, righ-click, webdriver

Você também pode querer ler

Comments are off for this post.