How to use manage method of Selenium.WebDriver Package

Best Selenium code snippet using Selenium.WebDriver.manage

driver.rb

Source:driver.rb Github

copy

Full Screen

...115 result = execute_script("return #{script}", *args)116 unwrap_script_result(result)117 end118 def evaluate_async_script(script, *args)119 browser.manage.timeouts.script_timeout = Capybara.default_max_wait_time120 result = browser.execute_async_script(script, *native_args(args))121 unwrap_script_result(result)122 end123 def send_keys(*args)124 active_element.send_keys(*args)125 end126 def save_screenshot(path, **_options)127 browser.save_screenshot(path)128 end129 def reset!130 # Use instance variable directly so we avoid starting the browser just to reset the session131 return unless @browser132 navigated = false133 timer = Capybara::Helpers.timer(expire_in: 10)134 begin135 # Only trigger a navigation if we haven't done it already, otherwise it136 # can trigger an endless series of unload modals137 reset_browser_state unless navigated138 navigated = true139 # Ensure the page is empty and trigger an UnhandledAlertError for any modals that appear during unload140 wait_for_empty_page(timer)141 rescue *unhandled_alert_errors142 # This error is thrown if an unhandled alert is on the page143 # Firefox appears to automatically dismiss this alert, chrome does not144 # We'll try to accept it145 accept_unhandled_reset_alert146 # try cleaning up the browser again147 retry148 end149 end150 def frame_obscured_at?(x:, y:)151 frame = @frame_handles[current_window_handle].last152 return false unless frame153 switch_to_frame(:parent)154 begin155 frame.base.obscured?(x: x, y: y)156 ensure157 switch_to_frame(frame)158 end159 end160 def switch_to_frame(frame)161 handles = @frame_handles[current_window_handle]162 case frame163 when :top164 handles.clear165 browser.switch_to.default_content166 when :parent167 handles.pop168 browser.switch_to.parent_frame169 else170 handles << frame171 browser.switch_to.frame(frame.native)172 end173 end174 def current_window_handle175 browser.window_handle176 end177 def window_size(handle)178 within_given_window(handle) do179 size = browser.manage.window.size180 [size.width, size.height]181 end182 end183 def resize_window_to(handle, width, height)184 within_given_window(handle) do185 browser.manage.window.resize_to(width, height)186 end187 end188 def maximize_window(handle)189 within_given_window(handle) do190 browser.manage.window.maximize191 end192 sleep 0.1 # work around for https://code.google.com/p/selenium/issues/detail?id=7405193 end194 def fullscreen_window(handle)195 within_given_window(handle) do196 browser.manage.window.full_screen197 end198 end199 def close_window(handle)200 raise ArgumentError, 'Not allowed to close the primary window' if handle == window_handles.first201 within_given_window(handle) do202 browser.close203 end204 end205 def window_handles206 browser.window_handles207 end208 def open_new_window(kind = :tab)209 browser.manage.new_window(kind)210 rescue NoMethodError, Selenium::WebDriver::Error::WebDriverError211 # If not supported by the driver or browser default to using JS212 browser.execute_script('window.open();')213 end214 def switch_to_window(handle)215 browser.switch_to.window handle216 end217 def accept_modal(_type, **options)218 yield if block_given?219 modal = find_modal(**options)220 modal.send_keys options[:with] if options[:with]221 message = modal.text222 modal.accept223 message224 end225 def dismiss_modal(_type, **options)226 yield if block_given?227 modal = find_modal(**options)228 message = modal.text229 modal.dismiss230 message231 end232 def quit233 @browser&.quit234 rescue Selenium::WebDriver::Error::SessionNotCreatedError, Errno::ECONNREFUSED,235 Selenium::WebDriver::Error::InvalidSessionIdError236 # Browser must have already gone237 rescue Selenium::WebDriver::Error::UnknownError => e238 unless silenced_unknown_error_message?(e.message) # Most likely already gone239 # probably already gone but not sure - so warn240 warn "Ignoring Selenium UnknownError during driver quit: #{e.message}"241 end242 ensure243 @browser = nil244 end245 def invalid_element_errors246 @invalid_element_errors ||= begin247 [248 ::Selenium::WebDriver::Error::StaleElementReferenceError,249 ::Selenium::WebDriver::Error::ElementNotInteractableError,250 ::Selenium::WebDriver::Error::InvalidSelectorError, # Work around chromedriver go_back/go_forward race condition251 ::Selenium::WebDriver::Error::ElementClickInterceptedError,252 ::Selenium::WebDriver::Error::NoSuchElementError, # IE253 ::Selenium::WebDriver::Error::InvalidArgumentError # IE254 ].tap do |errors|255 unless selenium_4?256 ::Selenium::WebDriver.logger.suppress_deprecations do257 errors.concat [258 ::Selenium::WebDriver::Error::UnhandledError,259 ::Selenium::WebDriver::Error::ElementNotVisibleError,260 ::Selenium::WebDriver::Error::InvalidElementStateError,261 ::Selenium::WebDriver::Error::ElementNotSelectableError262 ]263 end264 end265 end266 end267 end268 def no_such_window_error269 Selenium::WebDriver::Error::NoSuchWindowError270 end271private272 def selenium_4?273 defined?(Selenium::WebDriver::VERSION) && (Selenium::WebDriver::VERSION.to_f >= 4)274 end275 def native_args(args)276 args.map { |arg| arg.is_a?(Capybara::Selenium::Node) ? arg.native : arg }277 end278 def clear_browser_state279 delete_all_cookies280 clear_storage281 rescue *clear_browser_state_errors282 # delete_all_cookies fails when we've previously gone283 # to about:blank, so we rescue this error and do nothing284 # instead.285 end286 def clear_browser_state_errors287 @clear_browser_state_errors ||= [Selenium::WebDriver::Error::UnknownError]288 end289 def unhandled_alert_errors290 @unhandled_alert_errors ||= with_legacy_error(291 [Selenium::WebDriver::Error::UnexpectedAlertOpenError],292 'UnhandledAlertError'293 )294 end295 def delete_all_cookies296 @browser.manage.delete_all_cookies297 end298 def clear_storage299 clear_session_storage unless options[:clear_session_storage] == false300 clear_local_storage unless options[:clear_local_storage] == false301 rescue Selenium::WebDriver::Error::JavascriptError302 # session/local storage may not be available if on non-http pages (e.g. about:blank)303 end304 def clear_session_storage305 if @browser.respond_to? :session_storage306 @browser.session_storage.clear307 else308 begin309 @browser&.execute_script('window.sessionStorage.clear()')310 rescue # rubocop:disable Style/RescueStandardError...

Full Screen

Full Screen

minitest_helper.rb

Source:minitest_helper.rb Github

copy

Full Screen

...25def firefox26 # Selenium::WebDriver::Firefox::Binary.path= '/opt/firefox/firefox'27 # Selenium::WebDriver::Firefox::Binary.path= '/Applications/Firefox.app/Contents/MacOS/firefox'28 @driver = Selenium::WebDriver.for :firefox29 @driver.manage.window.resize_to(1224,1000)30 @driver.manage.timeouts.implicit_wait = 531end32def firefox_with_proxy33 proxy_location = Settings.location34 @server = BrowserMob::Proxy::Server.new(proxy_location)35 @server.start36 @proxy = server.create_proxy37 @profile = Selenium::WebDriver::Firefox::Profile.new38 @profile.proxy = @proxy.selenium_proxy39 @driver = Selenium::WebDriver.for :firefox, :profile => @profile40 @driver.manage.window.resize_to(1224,1000)41 @driver.manage.timeouts.implicit_wait = 542end43def fire_fox_with_secure_proxy44 proxy_location = Settings.location45 $_server ||= BrowserMob::Proxy::Server.new(proxy_location).start46 @proxy = $_server.create_proxy47 @profile = Selenium::WebDriver::Firefox::Profile.new48 @profile.proxy = @proxy.selenium_proxy(:http, :ssl)49 @driver = Selenium::WebDriver.for :firefox, :profile => @profile50 @driver.manage.window.resize_to(1224,1000)51 @driver.manage.timeouts.implicit_wait = 352 @driver.manage.timeouts.page_load = 2453end54def fire_fox_remote_proxy55 proxy_location = Settings.location56 server = BrowserMob::Proxy::Server.new(proxy_location)57 server.start58 @proxy = server.create_proxy59 @profile = Selenium::WebDriver::Firefox::Profile.new60 @profile.proxy = @proxy.selenium_proxy(:http, :ssl)61 caps = Selenium::WebDriver::Remote::Capabilities.new(62 :browser_name => "firefox", :firefox_profile => @profile63 )64 @driver = Selenium::WebDriver.for(65 :remote,66 url: 'http://jenkins.choicemedia.com:4444//wd/hub',67 desired_capabilities: caps) 68 @driver.manage.window.resize_to(1224,1000)69 @driver.manage.timeouts.implicit_wait = 570end71def mobile_fire_fox_with_secure_proxy72 proxy_location = Settings.location73 $_server ||= BrowserMob::Proxy::Server.new(proxy_location).start74 75 @proxy = $_server.create_proxy76 @profile = Selenium::WebDriver::Firefox::Profile.new77 @profile.proxy = @proxy.selenium_proxy(:http, :ssl)78 @profile['general.useragent.override'] = 'Mozilla/5.0 (Linux; U; Android 4.0.3; ko-kr; LG-L160L Build/IML74K) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30'79 @driver = Selenium::WebDriver.for :firefox, :profile => @profile80 @driver.manage.window.resize_to(425,960)81 @driver.manage.timeouts.implicit_wait = 582 @driver.manage.timeouts.page_load = 2483end84def fire_fox_remote85 @driver = Selenium::WebDriver.for(86 :remote,87 url: 'http://jenkins.choicemedia.com:4444//wd/hub',88 desired_capabilities: :firefox)89 @driver.manage.window.resize_to(1224,1000)90 @driver.manage.timeouts.implicit_wait = 591end92def cleanup_driver_and_proxy93 @driver.quit 94 @proxy.close95end96def phantomjs97 @driver = Selenium::WebDriver.for :remote, url: 'http://localhost:8001'98end99def visit(url)100 preload_page(url)101 begin102 @driver.navigate.to url 103 rescue Timeout::Error, Net::ReadTimeout, Selenium::WebDriver::Error::TimeOutError104 end...

Full Screen

Full Screen

Base.rb

Source:Base.rb Github

copy

Full Screen

...15 pathToIEDriverServer_Win32 = '/path/To/IEDriverServer_Win32/IEDriverServer_Win32'16 case name17 when "firefox" then18 driver = Selenium::WebDriver.for :firefox19 driver.manage.window.maximize20 when "chrome" then21 Selenium::WebDriver::Chrome::Service.executable_path =22 File.absolute_path(pathToChromedriver)23 driver =24 Selenium::WebDriver.for :chrome, :switches => %w[--ignore-certificate-errors --disable-popup-blocking --disable-translate]25 driver.manage.window.maximize26 when "ie" then27 old_path = ENV['PATH']28 ENV['PATH'] = old_path + ';' + pathToIEDriverServer_Win3229 driver = Selenium::WebDriver.for :ie30 ENV['PATH'] = old_path31 driver.manage.window.maximize32 when "Android Chrome" then33 caps =34 Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" =>35 {"androidPackage" =>36 'com.android.chrome'}37 )38 driver = Selenium::WebDriver.for(:remote,39 :url => "http://" + server + ":9515/wd/hub",40 :desired_capabilities => caps)41 when "Android Chrome Remote" then42 caps =43 Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" =>44 {"androidPackage" =>45 'com.android.chrome'}46 )47 driver = Selenium::WebDriver.for(:remote,48 :url => "http://" + server_remote + ":9515/wd/hub",49 :desired_capabilities => caps)50 when "firefox grid local" then51 caps =52 Selenium::WebDriver::Remote::Capabilities.firefox(53 :version => "43.0",54 )55 driver = Selenium::WebDriver.for(:remote,56 :url => gridURL,57 :desired_capabilities => caps)58 driver.manage.window.maximize59 when "firefox grid remote" then60 caps =61 Selenium::WebDriver::Remote::Capabilities.firefox(62 :version =>63 "43.0 remote",64 )65 driver = Selenium::WebDriver.for(:remote,66 :url => gridURL,67 :desired_capabilities => caps)68 driver.manage.window.maximize69 when "chrome grid local" then70 caps =71 Selenium::WebDriver::Remote::Capabilities.chrome(72 :version => "47.0.2526.106 m (64-bit)",73 )74 driver = Selenium::WebDriver.for(:remote,75 :url => gridURL,76 :desired_capabilities => caps)77 driver.manage.window.maximize78 when "chrome grid remote" then79 caps =80 Selenium::WebDriver::Remote::Capabilities.chrome(81 :version => "47.0.2526.106 m remote",82 )83 driver = Selenium::WebDriver.for(:remote,84 :url => gridURL,85 :desired_capabilities => caps)86 driver.manage.window.maximize87 when "ie grid local" then88 caps =89 Selenium::WebDriver::Remote::Capabilities.ie(90 :version => "11.0 X64",91 )92 driver = Selenium::WebDriver.for(:remote,93 :url => gridURL,94 :desired_capabilities => caps)95 driver.manage.window.maximize96 when "ie grid remote" then97 caps =98 Selenium::WebDriver::Remote::Capabilities.ie(99 :version => "11.0 Win32",100 )101 driver = Selenium::WebDriver.for(:remote,102 :url => gridURL,103 :desired_capabilities => caps)104 driver.manage.window.maximize105 when "Android Chrome grid local" then106 caps =107 Selenium::WebDriver::Remote::Capabilities.chrome(108 "chromeOptions" =>109 {"androidPackage" => 'com.android.chrome'},110 :version => "android local"111 )112 driver = Selenium::WebDriver.for(:remote,113 :url => gridURL,114 :desired_capabilities => caps)115 when "Android Chrome grid remote" then116 caps =117 Selenium::WebDriver::Remote::Capabilities.chrome(118 "chromeOptions" =>...

Full Screen

Full Screen

driver_config.rb

Source:driver_config.rb Github

copy

Full Screen

...24 @driver = Selenium::WebDriver.for :firefox, :profile => profile25 else26 @driver = Selenium::WebDriver.for :firefox27 end28 @driver.manage.timeouts.implicit_wait = 3029 #@driver.manage.timeouts.page_load = 12030 @driver.manage.window.maximize31end32#Chrome browser33def launch_driver_chrome34 @driver = Selenium::WebDriver.for :chrome35 @driver.manage.timeouts.implicit_wait = 3036 @driver.manage.timeouts.page_load = 12037 @driver.manage.window.maximize38end39#Device40def launch_driver_device41 #puts "Launching driver for chrome.........................."42 # @driver = Selenium::WebDriver.for :chrome43 # @driver.manage.timeouts.implicit_wait = 6044 # @driver.manage.window.maximize45 deviceName = ENV['VERSION']46 deviceName = deviceName.gsub("_", " ")47 mobile_emulation = { "deviceName" => deviceName }48 caps = Selenium::WebDriver::Remote::Capabilities.chrome(49 "chromeOptions" => { "mobileEmulation" => mobile_emulation })50 @driver = Selenium::WebDriver.for :chrome, desired_capabilities: caps51 @driver.manage.timeouts.implicit_wait = 6052end53#IE browser54def launch_driver_ie55 client = Selenium::WebDriver::Remote::Http::Default.new56 client.timeout = 12057 caps = Selenium::WebDriver::Remote::Capabilities.ie('ie.ensureCleanSession' => true, :javascript_enabled => true, :native_events => false, :acceptSslCerts => true)58 @driver = Selenium::WebDriver.for(:remote, :http_client => client, :url => "http://localhost:5555", :desired_capabilities => caps)59 @driver.manage.timeouts.implicit_wait = 9060 @driver.manage.timeouts.page_load = 12061 @driver.manage.window.size = Selenium::WebDriver::Dimension.new(1366,768)62 #if ENV['RESOLUTION'].nil?63 # @driver.manage.window.size = Selenium::WebDriver::Dimension.new(1366,768)64 #elsif ENV['RESOLUTION'].downcase == "max"65 # @driver.manage.window.maximize66 #else67 # res = ENV['RESOLUTION'].split('x')68 # @driver.manage.window.size = Selenium::WebDriver::Dimension.new(res.first.to_i, res.last.to_i)69 #end70end71#Opera browser72def launch_driver_opera73 client = Selenium::WebDriver::Remote::Http::Default.new74 client.timeout = 180 # seconds75 service = Selenium::WebDriver::Chrome::Service.new("/usr/local/bin/operadriver", 48923)76 service.start77 sleep(10)78 begin79 cap = Selenium::WebDriver::Remote::Capabilities.chrome('operaOptions' => {'binary' => '/usr/bin/opera', 'args' => ["--ignore-certificate-errors"]})80 @driver = Selenium::WebDriver.for(:remote, :url => service.uri, :desired_capabilities => cap, :http_client => client)81 @driver.manage.timeouts.implicit_wait = 9082 @driver.manage.window.maximize83 @driver.manage.timeouts.page_load = 15084 rescue85 cap = Selenium::WebDriver::Remote::Capabilities.chrome('operaOptions' => {'binary' => '/usr/bin/opera', 'args' => ["--ignore-certificate-errors"]})86 @driver = Selenium::WebDriver.for(:remote, :url => service.uri, :desired_capabilities => cap, :http_client => client)87 @driver.manage.timeouts.implicit_wait = 9088 @driver.manage.window.maximize89 @driver.manage.timeouts.page_load = 15090 end91 92end93 def launch_driver_android_chrome94 client = Selenium::WebDriver::Remote::Http::Default.new95 client.timeout = 12096 caps = {'chromeOptions'=> {'androidPackage' => 'com.android.chrome'}}97 @driver = Selenium::WebDriver.for(:remote, :http_client => client, :url => "http://localhost:9515", :desired_capabilities => caps)98 @driver.manage.timeouts.implicit_wait = 6099 end100#Android browser101def launch_driver_android102 @driver = Selenium::WebDriver.for :remote, :desired_capabilities => :android103end104def driver105 @driver106end107def quit_driver108 @driver.quit109end...

Full Screen

Full Screen

webdriver_handler_spec.rb

Source:webdriver_handler_spec.rb Github

copy

Full Screen

...3describe Bucky::TestEquipment::SeleniumHandler::WebdriverHandler do4 include Bucky::TestEquipment::SeleniumHandler::WebdriverHandler5 let(:config_double) { double('double of Config') }6 let(:webdriver_double) { double('double of Webdriver') }7 let(:webdriver_manage_double) { double('double of Webdriver.manage') }8 let(:webdriver_manage_window_double) { double('double of Webdriver.manage.window') }9 let(:webdriver_manage_timeouts_double) { double('double of Webdriver.manage.timeouts') }10 let(:webdriver_manage_timeouts_double_implicit_wait) { double('double of Webdriver.manage.timeouts.implicit_wait') }11 before do12 allow(Bucky::Utils::Config).to receive(:instance).and_return(config_double)13 allow(config_double).to receive('[]').with(:browser).and_return(browser)14 allow(config_double).to receive('[]').with(:selenium_ip).and_return(selenium_ip)15 allow(config_double).to receive('[]').with(:selenium_port).and_return(selenium_port)16 allow(config_double).to receive('[]').with(:device_name_on_chrome).and_return(device_name_on_chrome)17 allow(config_double).to receive('[]').with(:sp_device_name).and_return(sp_device_name)18 allow(config_double).to receive('[]').with(:tablet_device_name).and_return(sp_device_name)19 allow(config_double).to receive('[]').with(:bucky_error).and_return(bucky_error)20 allow(config_double).to receive('[]').with(:driver_open_timeout).and_return(10)21 allow(config_double).to receive('[]').with(:driver_read_timeout).and_return(10)22 allow(config_double).to receive('[]').with(:user_agent).and_return(10)23 allow(config_double).to receive('[]').with(:find_element_timeout).and_return(10)24 allow(config_double).to receive('[]').with(:headless).and_return(headless)25 allow(config_double).to receive('[]').with(:chromedriver_flags).and_return(chromedriver_flags)26 allow(Selenium::WebDriver).to receive(:for).and_return(webdriver_double)27 allow(webdriver_double).to receive(:manage).and_return(webdriver_manage_double)28 allow(webdriver_manage_double).to receive(:window).and_return(webdriver_manage_window_double)29 allow(webdriver_manage_window_double).to receive(:resize_to)30 allow(webdriver_manage_double).to receive(:timeouts).and_return(webdriver_manage_timeouts_double)31 allow(webdriver_manage_timeouts_double).to receive(:implicit_wait=)32 end33 describe '#create_webdriver' do34 let(:selenium_ip) { '11.22.33.44' }35 let(:selenium_port) { '4444' }36 let(:device_name_on_chrome) { { iphone6: 'Apple iPhone 6' } }37 let(:sp_device_name) { :iphone6 }38 let(:sp_device_name) { :ipad }39 let(:bucky_error) { 'bucky error' }40 let(:headless) { false }41 let(:chromedriver_flags) { ['--foo', '--bar', '--baz'] }42 context 'pc' do43 let(:device_type) { 'pc' }44 context 'browser is chrome' do45 let(:browser) { :chrome }...

Full Screen

Full Screen

env.rb

Source:env.rb Github

copy

Full Screen

...25 config.default_driver = :selenium26 config.default_selector = :css27 config.default_wait_time = 1028 end29 Capybara.page.driver.browser.manage.window.maximize30 Capybara.register_driver :selenium do |app|31 profile = Selenium::WebDriver::Firefox::Profile.new32 Capybara::Selenium::Driver.new(app, :browser => :firefox, :profile => profile, :desired_capabilities => caps)33 end34when "chrome"35 require 'selenium-webdriver'36 puts "BROWSER = "+ENV['BROWSER']37 caps = Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" => {"args" => [ "--allow-running-insecure-content" ]}) #"--disable-web-security",38 Capybara.register_driver :chrome do |app|39 Capybara::Selenium::Driver.new(app, :browser => :chrome, :desired_capabilities => caps)40 end41 Capybara.default_driver = :chrome42 Capybara.default_wait_time = 1043 Capybara.default_selector = :css44 Capybara.page.driver.browser.manage.window.maximize45when "ie"46 puts "BROWSER = "+ENV['BROWSER']47 Capybara.register_driver :selenium_ie do |app|48 Capybara::Selenium::Driver.new(app, :browser => :ie)49 end50 Capybara.default_driver = :selenium_ie51 Capybara.default_wait_time = 1552 Capybara.page.driver.browser.manage.window.maximize53 when "grid-firefox"54 require 'selenium-webdriver'55 # driver = Selenium::WebDriver.for(:remote, :url => "http://127.0.0.1:5555/wd/hub", :desired_capabilities => :firefox)56 caps = Selenium::WebDriver::Remote::Capabilities.firefox("firefoxOptions" => {"args" => [ "--allow-running-insecure-content" ]})57 Capybara.default_driver = :selenium58 Capybara.register_driver :selenium do |app|59 Capybara::Selenium::Driver.new(app,60 :browser => :remote,61 :url => "http://127.0.0.1:5555/wd/hub",62 :desired_capabilities => caps)63 end64 when "grid-chrome"65 require 'selenium-webdriver'66 # driver = Selenium::WebDriver.for(:remote, :url => "http://127.0.0.1:5555/wd/hub", :desired_capabilities => :firefox)67 caps = Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" => {"args" => [ "--allow-running-insecure-content" ]})68 Capybara.default_driver = :selenium69 Capybara.register_driver :selenium do |app|70 Capybara::Selenium::Driver.new(app,71 :browser => :remote,72 :url => "http://127.0.0.1:8989/wd/hub",73 :desired_capabilities => caps)74 end75 when "grid-ie"76 require 'selenium-webdriver'77 # driver = Selenium::WebDriver.for(:remote, :url => "http://127.0.0.1:5555/wd/hub", :desired_capabilities => :firefox)78 caps = Selenium::WebDriver::Remote::Capabilities.ie79 Capybara.default_driver = :selenium80 Capybara.register_driver :selenium do |app|81 Capybara::Selenium::Driver.new(app,82 :browser => :remote,83 :url => "http://127.0.0.1:9999/wd/hub",84 :desired_capabilities => caps)85 end86else87Capybara.configure do |config|88 config.default_driver = :selenium89 #config.run_server = false90 config.default_selector = :css91 config.default_wait_time = 1092end93 Capybara.page.driver.browser.manage.window.maximize94 Capybara.register_driver :selenium do |app|95 profile = Selenium::WebDriver::Firefox::Profile.new96 Capybara::Selenium::Driver.new(app, :browser => :firefox, :profile => profile)97 end98end99require File.dirname(__FILE__) + '/lib/configuration';100BASE_URL = Configuration["base_url"]101$base_url = BASE_URL...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Selenium automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used method in

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful