SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Selenium Page Object
Patterns
Test Automation
Narayanan Palani
6.1 What is Page Object Design Pattern?
• Page Object is a Design Pattern which has become popular in test automation for enhancing test maintenance
and reducing code duplication.
• A page object is an object-oriented class that serves as an interface to a page of your AUT.
• The tests then use the methods of this page object class whenever they need to interact with that page of the UI.
• The benefit is that if the UI changes for the page, the tests themselves don’t need to change, only the code within
the page object needs to change.
• Subsequently all changes to support that new UI are located in one place.
• Page Objects are meant to encapsulate the messy internal state of a page.
• In a simple form of Page Object Model, Create two packages – one will contain one java file which contains the
objects of all the pages in an application and other package will contains all smoke test java files which will utilize
those objects.
6.2 Creating Objects In Page Object Design Pattern
• Create all the page objects in one java file (or create the objects on page level under one java folder )and then
create the test file in other file (or under other java folder). There is a Page Factory in the support package that
provides support for this pattern. Using Page Factory under test file, we can access these page objects in other
java file.
Page Factory
• In order to support Page Object Design Pattern. Web Driver Supports a library that contains a factory class.
• There is a Page Factory in the Support package that provides support for this pattern.
• Using Page Factory under test file, we can access these page objects in other java file.
• While creating any object, if you use the Page Factory , you can assume the fields are initialised, else
NullPonterExceptions will be thrown.
Contd..
@FindBy and @FindBys Annotation
• Fields are decorated if and only if they have @FindBy or @FindBys annotation.
• Default search strategy "by id or name" that works for WebElement fields is hardly suitable for lists because it is
rare to have several elements with the same id or name on a page.
• If you never use a WebElement field in a PageObject, there will never be a call to "findElement" for it.
Contd…
Contd…
InitElement Methods
• Page Factory class provides four variations of InItElements methods which can be used based on the project
requirement.
• Based on the requirement, we can use one or all of them in a single framework so that we can attain the
respective functionality.
1. ElementLocatorFactory:
InitElements method will contain an “ElementLocatorFactory”.
ElementLocatorFactory: is used for providing the mechanism for fniding elements.methods.
Syntax:
• initElements(ElementLocatorFactory factory, java.lang.Object page)
InitElement Methods
2. FieldDecorator
• InitElements method will contain an FieldDecorator.
FieldDecorator is used for decorating each of the fields.
Syntax:
initElements(FieldDecorator decorator, java.lang.Object page)
InitElement Methods
3 .Page Class
.InitElements method which will contain a page class.
Syntax:
• initElements(WebDriver driver,java.lang.Class<T> pageClass)
• Instantiate an instance of the given class, and set a proxy for each of the WebElement and List fields that have
been declared, assuming that the field name is also the HTML element's "id" or "name". Means there will be an
element that can be located using the xpath expression.
InitElement Methods
4.PageClass Variation
InitElements method will contain a page class similar to variation:
Syntax:
• initElements(WebDriver driver, java.lang.Object page)
• As initElements(org.openqa.selenium.WebDriver, Class) but will only replace the fields of an already instantiated
Page Object.
6.3 Advantages of PODM
The following are the advantages of Page Object Design Pattern:
• There is clean separation between test code and page specific code such as locators (or their use if you’re using
a UI map) and layout.
• There is single repository for the services or operations offered by the page rather than having these services
scattered through out the tests.
In both cases this allows any modifications required due to UI changes to all be made in one place.
6.3 Dis Advantages of PODM
The following are the disadvantages of Page Object Design Pattern:
• There is no separation between the test method and the AUTs locators (IDs in this example); both are
intertwined in a single method. If the AUT’s UI changes its identifiers, layout, or how a login is input and
processed, the test itself must change.
• The id-locators would be spread in multiple tests, all tests that had to use this login page.
REFERENCE

Weitere ähnliche Inhalte

Andere mochten auch

Design patterns in web testing automation with WebDriver
Design patterns in web testing automation with WebDriverDesign patterns in web testing automation with WebDriver
Design patterns in web testing automation with WebDriverMikalai Alimenkou
 
Selenium WebDriver with C#
Selenium WebDriver with C#Selenium WebDriver with C#
Selenium WebDriver with C#srivinayak
 
DSL, Page Object and Selenium – a way to reliable functional tests
DSL, Page Object and Selenium – a way to reliable functional testsDSL, Page Object and Selenium – a way to reliable functional tests
DSL, Page Object and Selenium – a way to reliable functional testsMikalai Alimenkou
 
Selenium Grid
Selenium GridSelenium Grid
Selenium Gridnirvdrum
 
Perils of Page-Object Pattern
Perils of Page-Object PatternPerils of Page-Object Pattern
Perils of Page-Object PatternAnand Bagmar
 
Selenium grid workshop london 2016
Selenium grid workshop london 2016Selenium grid workshop london 2016
Selenium grid workshop london 2016Marcus Merrell
 
Continuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And DockerContinuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And DockerBarbara Gonzalez
 
Using The Page Object Pattern
Using The Page Object PatternUsing The Page Object Pattern
Using The Page Object PatternDante Briones
 
Selenium Architecture
Selenium ArchitectureSelenium Architecture
Selenium Architecturerohitnayak
 
BDD with JBehave and Selenium
BDD with JBehave and SeleniumBDD with JBehave and Selenium
BDD with JBehave and SeleniumNikolay Vasilev
 

Andere mochten auch (12)

Selenium WebDriver
Selenium WebDriverSelenium WebDriver
Selenium WebDriver
 
Design patterns in web testing automation with WebDriver
Design patterns in web testing automation with WebDriverDesign patterns in web testing automation with WebDriver
Design patterns in web testing automation with WebDriver
 
Selenium WebDriver with C#
Selenium WebDriver with C#Selenium WebDriver with C#
Selenium WebDriver with C#
 
DSL, Page Object and Selenium – a way to reliable functional tests
DSL, Page Object and Selenium – a way to reliable functional testsDSL, Page Object and Selenium – a way to reliable functional tests
DSL, Page Object and Selenium – a way to reliable functional tests
 
Selenium Grid
Selenium GridSelenium Grid
Selenium Grid
 
Perils of Page-Object Pattern
Perils of Page-Object PatternPerils of Page-Object Pattern
Perils of Page-Object Pattern
 
Selenium grid workshop london 2016
Selenium grid workshop london 2016Selenium grid workshop london 2016
Selenium grid workshop london 2016
 
Basic Selenium Training
Basic Selenium TrainingBasic Selenium Training
Basic Selenium Training
 
Continuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And DockerContinuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And Docker
 
Using The Page Object Pattern
Using The Page Object PatternUsing The Page Object Pattern
Using The Page Object Pattern
 
Selenium Architecture
Selenium ArchitectureSelenium Architecture
Selenium Architecture
 
BDD with JBehave and Selenium
BDD with JBehave and SeleniumBDD with JBehave and Selenium
BDD with JBehave and Selenium
 

Mehr von Narayanan Palani

Web Accessibility Testing Trends and Shift Left Testing of accessibility usin...
Web Accessibility Testing Trends and Shift Left Testing of accessibility usin...Web Accessibility Testing Trends and Shift Left Testing of accessibility usin...
Web Accessibility Testing Trends and Shift Left Testing of accessibility usin...Narayanan Palani
 
Orthogonal array testing course
Orthogonal array testing courseOrthogonal array testing course
Orthogonal array testing courseNarayanan Palani
 
Istqb foundation-and-selenium-java-automation-testing course
Istqb foundation-and-selenium-java-automation-testing courseIstqb foundation-and-selenium-java-automation-testing course
Istqb foundation-and-selenium-java-automation-testing courseNarayanan Palani
 
Istqb ctfl performance testing training course
Istqb ctfl performance testing training courseIstqb ctfl performance testing training course
Istqb ctfl performance testing training courseNarayanan Palani
 
Istqb ctal advanced security testing training course
Istqb ctal advanced security testing training courseIstqb ctal advanced security testing training course
Istqb ctal advanced security testing training courseNarayanan Palani
 
Istqb agile tester foundations professional training
Istqb agile tester foundations  professional trainingIstqb agile tester foundations  professional training
Istqb agile tester foundations professional trainingNarayanan Palani
 
Istqb advanced test manager training course
Istqb advanced test manager training courseIstqb advanced test manager training course
Istqb advanced test manager training courseNarayanan Palani
 
Istqb advanced level test automation engineering q&amp;a syllabus-training
Istqb advanced level test automation engineering q&amp;a syllabus-trainingIstqb advanced level test automation engineering q&amp;a syllabus-training
Istqb advanced level test automation engineering q&amp;a syllabus-trainingNarayanan Palani
 
Cypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests courseCypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests courseNarayanan Palani
 
Career trick create your first github profile get hired course
Career trick create your first github profile  get hired courseCareer trick create your first github profile  get hired course
Career trick create your first github profile get hired courseNarayanan Palani
 
Software Automation Testing Introduction
Software Automation Testing IntroductionSoftware Automation Testing Introduction
Software Automation Testing IntroductionNarayanan Palani
 

Mehr von Narayanan Palani (11)

Web Accessibility Testing Trends and Shift Left Testing of accessibility usin...
Web Accessibility Testing Trends and Shift Left Testing of accessibility usin...Web Accessibility Testing Trends and Shift Left Testing of accessibility usin...
Web Accessibility Testing Trends and Shift Left Testing of accessibility usin...
 
Orthogonal array testing course
Orthogonal array testing courseOrthogonal array testing course
Orthogonal array testing course
 
Istqb foundation-and-selenium-java-automation-testing course
Istqb foundation-and-selenium-java-automation-testing courseIstqb foundation-and-selenium-java-automation-testing course
Istqb foundation-and-selenium-java-automation-testing course
 
Istqb ctfl performance testing training course
Istqb ctfl performance testing training courseIstqb ctfl performance testing training course
Istqb ctfl performance testing training course
 
Istqb ctal advanced security testing training course
Istqb ctal advanced security testing training courseIstqb ctal advanced security testing training course
Istqb ctal advanced security testing training course
 
Istqb agile tester foundations professional training
Istqb agile tester foundations  professional trainingIstqb agile tester foundations  professional training
Istqb agile tester foundations professional training
 
Istqb advanced test manager training course
Istqb advanced test manager training courseIstqb advanced test manager training course
Istqb advanced test manager training course
 
Istqb advanced level test automation engineering q&amp;a syllabus-training
Istqb advanced level test automation engineering q&amp;a syllabus-trainingIstqb advanced level test automation engineering q&amp;a syllabus-training
Istqb advanced level test automation engineering q&amp;a syllabus-training
 
Cypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests courseCypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests course
 
Career trick create your first github profile get hired course
Career trick create your first github profile  get hired courseCareer trick create your first github profile  get hired course
Career trick create your first github profile get hired course
 
Software Automation Testing Introduction
Software Automation Testing IntroductionSoftware Automation Testing Introduction
Software Automation Testing Introduction
 

Kürzlich hochgeladen

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 

Kürzlich hochgeladen (20)

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 

Selenium page objectpatterns

  • 1. Selenium Page Object Patterns Test Automation Narayanan Palani
  • 2.
  • 3. 6.1 What is Page Object Design Pattern? • Page Object is a Design Pattern which has become popular in test automation for enhancing test maintenance and reducing code duplication. • A page object is an object-oriented class that serves as an interface to a page of your AUT. • The tests then use the methods of this page object class whenever they need to interact with that page of the UI. • The benefit is that if the UI changes for the page, the tests themselves don’t need to change, only the code within the page object needs to change. • Subsequently all changes to support that new UI are located in one place. • Page Objects are meant to encapsulate the messy internal state of a page. • In a simple form of Page Object Model, Create two packages – one will contain one java file which contains the objects of all the pages in an application and other package will contains all smoke test java files which will utilize those objects.
  • 4. 6.2 Creating Objects In Page Object Design Pattern • Create all the page objects in one java file (or create the objects on page level under one java folder )and then create the test file in other file (or under other java folder). There is a Page Factory in the support package that provides support for this pattern. Using Page Factory under test file, we can access these page objects in other java file.
  • 5. Page Factory • In order to support Page Object Design Pattern. Web Driver Supports a library that contains a factory class. • There is a Page Factory in the Support package that provides support for this pattern. • Using Page Factory under test file, we can access these page objects in other java file. • While creating any object, if you use the Page Factory , you can assume the fields are initialised, else NullPonterExceptions will be thrown.
  • 7. @FindBy and @FindBys Annotation • Fields are decorated if and only if they have @FindBy or @FindBys annotation. • Default search strategy "by id or name" that works for WebElement fields is hardly suitable for lists because it is rare to have several elements with the same id or name on a page. • If you never use a WebElement field in a PageObject, there will never be a call to "findElement" for it.
  • 10. InitElement Methods • Page Factory class provides four variations of InItElements methods which can be used based on the project requirement. • Based on the requirement, we can use one or all of them in a single framework so that we can attain the respective functionality. 1. ElementLocatorFactory: InitElements method will contain an “ElementLocatorFactory”. ElementLocatorFactory: is used for providing the mechanism for fniding elements.methods. Syntax: • initElements(ElementLocatorFactory factory, java.lang.Object page)
  • 11. InitElement Methods 2. FieldDecorator • InitElements method will contain an FieldDecorator. FieldDecorator is used for decorating each of the fields. Syntax: initElements(FieldDecorator decorator, java.lang.Object page)
  • 12. InitElement Methods 3 .Page Class .InitElements method which will contain a page class. Syntax: • initElements(WebDriver driver,java.lang.Class<T> pageClass) • Instantiate an instance of the given class, and set a proxy for each of the WebElement and List fields that have been declared, assuming that the field name is also the HTML element's "id" or "name". Means there will be an element that can be located using the xpath expression.
  • 13. InitElement Methods 4.PageClass Variation InitElements method will contain a page class similar to variation: Syntax: • initElements(WebDriver driver, java.lang.Object page) • As initElements(org.openqa.selenium.WebDriver, Class) but will only replace the fields of an already instantiated Page Object.
  • 14. 6.3 Advantages of PODM The following are the advantages of Page Object Design Pattern: • There is clean separation between test code and page specific code such as locators (or their use if you’re using a UI map) and layout. • There is single repository for the services or operations offered by the page rather than having these services scattered through out the tests. In both cases this allows any modifications required due to UI changes to all be made in one place.
  • 15. 6.3 Dis Advantages of PODM The following are the disadvantages of Page Object Design Pattern: • There is no separation between the test method and the AUTs locators (IDs in this example); both are intertwined in a single method. If the AUT’s UI changes its identifiers, layout, or how a login is input and processed, the test itself must change. • The id-locators would be spread in multiple tests, all tests that had to use this login page.
  • 16.