This might be a very strange question, but I am not even sure how to title this question. I am quite new to C# and Selenium. I have done some coding on it and I'm quite comfortable creating a (very messy) test that runs how I want to. I would like to organize my tests a bit better.
I will use this as an example to what I want to achieve:
On a login page lets say I have a button "Log In" and that button opens a page that let's me put my credentials "Username" and "Password".
Lets say i would like to program it like this: have the landing page with the login with all the elements of that page, and one only for the elements of the login page.
And the test would be something like this:
LandingPage.Login.Click(); LandingPage.Login.Username("username"); LandingPage.Login.Password("password"; LandingPage.Login.LoginBtn.Click();
I have seen this type of coding being used. I'm starting to create a "page object model" for my test and would like to separate it so then i can use the way I showed above. The "LandinPage.cs" would have the login link as well as other elements and the "Login.cs" would have the username field and the password and the login button, along side other elements not relevant now.
My question is, is there a name for this kind of formatting? I am struggling to find such so I can start my studying there.