Skip to content

Make Selenium Easy

And Keep It That Way

  • Home
  • Share
  • Toggle search form

Selenium Framework 4: Understand Linear Framework in Selenium

Posted on 04/23/2025 By admin

Hello Folks,

In this post, we will learn about Linear Framework of Selenium webdriver.

We know, any framework has three base components: Functionality, Code and Data. When we mix up all three base components at same place is called Linear framework. In fact it is not framework , it should be called as linear scripting. A framework is something which could be reused but in this case that chances are very less. For example:

Consider you need to automate three scenarios as below:

  1. Login to application and logout.
  2. Register, login and logout.
  3. Delete your account from application.

Let’s understand base components for above scenarios:

  1. Functionality : Login. Logout, Register, Delete Account
  2. Code: Perform Login, Logout, Register and Delete Account
  3. Data: User Name, Details, User Id etc.

Hopefully, you can easily categorize and understand as shown above.

You start coding as below:

TestScript1_LoginLogout : Login Code, Hard coded all required data in script, logout code etc all in same file( Say .java file).

TestScript2_RegisterLoginLogout : Register Code, Rewriting Login Code again, Hard coded all required data in script, logout code etc all in same file( Say .java file).

TestScript2_DeleteAccount : Delete account code, Hard coded all required data in scrip etc all in same file( Say .java file).

You are done!

Advantages:

  1. Very simple.
  2. No need of advance coding knowledge.
  3. You will love copy and paste commands.
  4. You can ask for more time from clients and get more billings. :-p

Disadvantages:

  1. Since you are not using re-usability methodology, you need to rewrite the same reusable code again and again.
  2. Common codes or prerequisite or post-requisite codes are written in to each file causing more lines of code.
  3. Since you are hard coding data in scripts itself, you can not run the same script for different data easily. Manager asks you to run your script for 100 users. You will keep changing data 100 times and run script. Manually you can test functionality faster.
  4. You can not use output of scripts in to other scripts easily. TestScripts2 will generate a user which you can use for login or delete account scripts which you need to manually feed data in scripts.
  5. Maintenance and scalebility need Avenger’s power.  LOL. Any change in login or logout functionality, you need to update in all script files.
  6. You can not give this to anybody who can reuse your code.
  7. You can not setup your code in CI tools like Jenkins.
  8. You will not get good rating and appraisals. Sad!

When to use this framework?

  1. When functionalities are very less, short and straightforward.
  2. You want to make it project specific and no further usage after sometimes.
  3. You want to perform UNIT testing.
  4. Data and functionalities are always fixed and at any point chances of changing data is very minimal.
  5. Your budget and time both are less for project.
  6. You want to present POC on selenium.

If you have any doubt, feel free to comment below. If you like my posts, please like, comment, share and subscribe. #ThanksForReading

#HappySelenium

Uncategorized

Post navigation

Previous Post: API Testing
Next Post: Git Tutorial 19 – Git Switch – Create and Switch Branches – An Alternative of Git Checkout

Related Posts

Learn About Less Talked & Used XPath Function – concat() Uncategorized
Handling “This type of file can harm your computer.” Windows Dialog Box In Chrome Browser Uncategorized
#1. |Rest Assured Framework|Points To Consider Before Developing Test Automation Framework| Uncategorized
July 17, 2017 – Make Selenium Easy Uncategorized
August 17, 2019 – Make Selenium Easy Uncategorized
image – Make Selenium Easy Uncategorized

Recent Posts

  • Getting Started with Selenium 4: What Is New and How to Upgrade from Selenium 3
  • Manual Testing
  • Baby Steps To Become Efficient Selenium-Java Automation Tester
  • Features of Selenium 4.0.0 Release – Java Binding
  • Part 1: Handling Drop-down Created Using SELECT Tag In Selenium

Recent Comments

No comments to show.

Archives

  • April 2026
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • April 2024
  • March 2024
  • February 2024
  • December 2023
  • October 2023
  • August 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • May 2022
  • March 2022
  • October 2021
  • April 2021
  • March 2021
  • January 2021
  • December 2020
  • October 2020
  • September 2020
  • August 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • May 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • January 2018

Categories

  • Getting Started
  • Uncategorized

Copyright © 2026 Make Selenium Easy.

Powered by PressBook Masonry Dark