So my plan for this week was a different article – but it is stuck in development hell – at this moment it has 6,6k word and looks like it is far from done.
Instead, I will talk on the progress of the 1st program.
This Challenge began little earlier than planned
On Saturday 28th before the official start, I was travelling by train back from Gdańsk, boredom hit me like a truck, so I did some research.
The Tech Stack
Originally I intended to start the challenges to work with stuff, concepts and technologies I haven’t worked before. That’s why for the first app I chose WPF and freshly released .NET Core 3
I’ve considered other options like UWP or Electron, or even making it into the website. But in the end, WPF won.
Mostly because I am not a big fan of windows store, and all instructions for sideloading that I found were confusing to me.
I was looking at Electron but, in the end, I decided that I would at too much knew to the stuck, and I don’t want to overcomplicate my first program.
The 1st Issue
There is one glaring issue with selecting stuff with „windows” in the name. You can do it on mac! I fully expected that on my MacBook I wouldn’t be able to run my application. But somehow I was hoping that the project template will be available for me. Which means most of my development of this app will have to happen on my PC.
So while I was still travelling, I decided to create a „testfield”. I wanted to write a few page object models to see commonalities and understand the complexity.
That was a good thing because, in the Instant like a lightning bolt, the second issue hit me., the Second issue became clear:
The Real Complexity of project
So let’s take a look at the Simplest of login pages. (Ignore interface for know I will talk about it in different article)
From movable parts you have:
- Class Name
- all three locators.
And few more things basing on my experience I want to be moveable.
- Name Space
- driver name
For the driver name, there is a lot of conventions to name a few popular ones _driver, driver, driver, _webDriver, WebDrvier, etc
In theory, you could use leave it as it is, but I would prefer to have the same naming convention over the whole solution. And those are just driver! What if you use some wrapper? Like in Ocaramba Framework?
Plus there is the next issue:
Inheritance
In that case, you won’t have a driver in the file you will have to pass it to the constructor. And this is the biggest issue I see. Cause, in that case, you will have to change each driver reference in file. This is the most challenging part of this most straightforward case.
So what have so we have about ten or so moveable parts.
Do you know what is the worst part?
If I would created a simple class template for visual studio, It would do the same with much less effort. But my goal is to create more complex cases.
There is another case I haven’t yet covered!
What about field naming?
- Login is not a universal name, sometimes it is email or username.
- Same for Login but, sometimes it is called submit.
So what decision I made for now?
- Ignore namespace since the user will have to create a file, either way, it should generate the namespace
- I am assuming that using will go into the namespace.
- For now, I will stay with Login, Password and Login button.
- Maybe in future, I will add more complex fields To control it.
I have released pre-alpha version if you want to test it out it is available here.
It only accepts a class name for know.
That all!
What about you? Do you think the app has potential? Or you think it should have some feature? I am still looking for a good name for it! POLPG doesn’t roll off the tongue well.