ruby - Actual and Automated Context Menus are Different Selenium Webdriver -


i have googled question extensively yet no 1 seems have issue. also, side note, beginner @ selenium , ruby, try constructive possible question.

my task gather site information via context menu of various web elements. site practicing on http://pershinghall.com/ due use of auto-play , flash--which 2 things trying test for. when view page naturally , right-click on background, elements of context menu follows:

enter image description here

however, when automate process selenium, context menu options are:

enter image description here

would happen know why happening? code follows.

require 'rubygems' require 'selenium-webdriver'   driver = selenium::webdriver.for :firefox driver.get "http://pershinghall.com/" sleep(5)  elem = driver.find_element(:id, "background") driver.action.move_to(elem, 100, 100).click.context_click.perform 

finally, start of background html element is:

<div id="background"> <object style="visibility: visible;" id="flash_container" data="swf/index.swf" type="application/x-shockwave-flash" height="100%" width="100%"><param value="transparent" name="wmode"><param value="noscale" name="scale"><param value="lt" name="salign"><param value="true" name="allowfullscreen"></object> </div> 

much input!

it looks if test context-clicking on portion of screen other flash element you're aiming -- second screenshot firefox's context menu.

i'm not in position try myself @ moment, i'd experiment different parameters in line:

driver.action.move_to(elem, 100, 100).click.context_click.perform 

is there specific reason why you've settled on 100,100? possible you're overshooting or undershooting flash element?


Comments