Cross browser testing using Selenium and TestNG
Вставка
- Опубліковано 11 гру 2022
- With #crossbrowsertesting testing, we make sure that the site is rendered the same on every browser.
Why do we cross browser testing?
Font size mismatch in different browsers.
JavaScript implementation can be different.
CSS,HTML validation difference can be there.
Some browser still not supporting HTML5.
Page alignment and div size, Image orientation.
Browser incompatibility with OS ,Etc.
Following are covered in this video-
#MultiBrowser or Cross Browser Testing in Selenium
How to perform Cross Browser Testing
How do you do cross-browser testing in TestNG?
What is meant by cross-browser testing?
How do I test cross-browser testing in Selenium?
How is cross-browser testing done?
What is the need for cross-browser testing using Selenium WebDriver?
How do you write test cases for #cross-browser testing?
Can #selenium be used for cross-browser testing?
What is parameters in #testng
#realtime usecase of #citibank site.
Parameters which can be considered for cross browser testing-
Parameters(value={"browser","version","platform", "resolution"})
Also this video will help you resolve and fix below issue which may occur during test run-
Issue: "Can inject only one of ITestContext, XmlTest into a @BeforeTest annotated setup"
Maven dependencies:
Webdrivermanager: mvnrepository.com/artifact/io...
TestNG: mvnrepository.com/artifact/or...
Selenium java:
mvnrepository.com/artifact/or...
TentNG tutorial playlist - • TestNG with selenium4 ...
Note: we can pass an instance of ChromeOptions class to the web driver initialization to
manipulate various properties of the Chrome driver.
ChromeOptions options = new ChromeOptions()
options.addArgument("incognito");
ChromeDriver driver = new ChromeDriver(options);
And here are the list of available and most commonly used arguments for ChromeOptions class -
incognito: Opens Chrome in incognito mode
start-maximized: Opens Chrome in maximize mode.
headless: Opens Chrome in headless mode
disable-infobars: Prevents Chrome from displaying the notification "Chrome is being controlled by automated software"
disable-extensions: Disables existing extensions on Chrome browser
disable-popup-blocking: Disables pop-ups displayed on Chrome browser
make-default-browser: Makes Chrome default browser.
version: Prints chrome browser version.
Thanks for clear cut explanation. Concepts are getting clear when you explain it. Please upload a series for load testing using jmeter. Thanks.
very well explanation, thank you very much sir.
Thanks you sir! For awesome explanation.
Thanks for uploading. 👍
All browser should open by creating driver object and webdriver manager repository is enough?
don't we need a system.setproperty line in creating a browser instance? for different browsers? and also don't need to download drivers externally?
no need
@kotaanirudh1388 That's right.
For some reason my maven build is failing time and again. I tried to recreate the project, yet the same problem. P.S - my other maven projects are working fine. Is this maybe because of the dependency?
What are those dependencies added in pom.xml?
@@sdetadda the same ones you added. TestNg, Selenium and the garcia one.
Why ChromeOptions is used is it necessary
That is not mandatory, however we can pass an instance of ChromeOptions class to the web driver initialization to
manipulate various properties of the Chrome driver.
ChromeOptions options = new ChromeOptions()
options.addArgument("incognito");
ChromeDriver driver = new ChromeDriver(options);
And here are the list of available and most commonly used arguments for ChromeOptions class -
incognito: Opens Chrome in incognito mode
start-maximized: Opens Chrome in maximize mode.
headless: Opens Chrome in headless mode
disable-infobars: Prevents Chrome from displaying the notification "Chrome is being controlled by automated software"
disable-extensions: Disables existing extensions on Chrome browser
disable-popup-blocking: Disables pop-ups displayed on Chrome browser
make-default-browser: Makes Chrome default browser.
version: Prints chrome browser version.
where you store all browser exe files, ex chrome driver exe and edge.
He is using WebDriverManager from bonigarcia dependency so it will handle all driver exe files. No need to mention the paths explicitly in code. Even you can explore about Selenium Manager present in selenium 4.0 version.
Can you share the link for bongarcia dependncy i@@492832
Plz do videos on Cucumber BDD framework
Noted. Will upload the series with framework design.