Discussion Forums
- Topic List
- Most Recent Posts
- Sign In for more options
Does anyone have any experience dealing with pop-up boxes with scrubyt? I'm getting the following error when I try to select an option box on a pop-up window.
Error: Unable to locate element, using :name, "ddlslot1"
Here is the code Scrubyt.logger = Scrubyt::Logger.new data = Scrubyt::Extractor.define :agent => :firefox do fetch 'http://www.tvg.com' sleep 1 fill_textfield 'Login1$txtAccountNumber', '142883' fill_textfield 'Login1$txtPIN', '8240' select_option 'Login1$ddlState', 'Massachusetts' click_by_xpath('/html/body/form/div[2]/div/div/div/div/div[2]/div/ table/tbody/tr[5]/td[2]/input') sleep 5 fetch '/Authenticated/program/default.aspx' # click image to spawn a pop-up window that allows you to change the tracks selected on current page.
click_by_xpath('/html/body/form/div[2]/div/div[2]/div[2]/div/div
[2]/div[7]/img') #Select Dubai as a track **Error occurs here where I try to make a selection on the pop-up window
select_option 'ddlSlot1','Dubai'
once the selection(s) are made push this button to confirm the
selection and return to main page. click_by_path('/html/body/p/a') results "//body" It seems like the focus is not on the pop-up so I am not able to make the selection on the selection box. Any help would be appreciated. Thanks, Jim
