The main difference between launching the webpage in different browsers is by creating a webdriver object and accessing all the methods from that object.
When we create a webdriver object with respective to require browser driver then we can perform our actions on that particular browser.
Launch the web page in the FireFox browser.
Example: In the below example we are launching http://www.dummypoint.com/seleniumtemplate.html url using FireFox driver.
LaunchWebApp_FireFox.py
from selenium import webdriver import time driver = webdriver.Firefox(executable_path="/Users/admin/Documents/Skill2Lead/drivers/geckodriver.exe") driver.get("http://www.dummypoint.com/seleniumtemplate.html") time.sleep(5) driver.quit()
Launch the webpage in the Safari browser.
First we need to configure the settings to launch the webpage in the safari browser.
For more information please look into our video course for configuration.
Example: In the below example we are launching http://www.dummypoint.com/seleniumtemplate.html url using safari driver.
LaunchWebApp_Safari.py
from selenium import webdriver import time driver = webdriver.Safari() driver.get("http://www.dummypoint.com/seleniumtemplate.html") time.sleep(5) driver.quit()