I am trying to open a new tab in firefox with Watir Webdriver (javascript is on):
require 'rubygems'
require 'watir-webdriver'
browser = Watir::Browser.new :ff, :profile => "default"
browser.goto "http://google.com"
browser.execute_script("window.open('http://yahoo.com','_newtab')")
I followed the method on this page: Programmatically open new pages on Tabs But it opens a new window, instead of opening a new tab. What can I do to open only a new tab and not a new window? Or any other method to open a new tab?