Den Silver
Den Silver

Reputation: 321

Can't execute 'onclick' using 'fire_event'

I have a div menu which is hidden. Div includes a span with onclick:

onclick="parent.ClickMenuItem(this, '', 'http://some_link', 0); parent.wndPopupbtnMenu.hide();

When I try to execute it via fire_event nothing happens. But step becomes to passed.

page.spnMngUsers_element.fire_event :onclick

Page object of spnMngUsers:

in_iframe(:id => 'PortalSubmenuFrame') do |frame|
  span(:spnMngUsers, :xpath => "//span[text()='Users']", :frame => frame)
end

P.S.: Application based on iframe's

Upvotes: 0

Views: 383

Answers (1)

Fabrice31
Fabrice31

Reputation: 760

When you use fire_event, you don't give status, but action.

page.spnMngUsers_element.fire_event('click')

Upvotes: 1

Related Questions