When developing a page object model, the whole intention is generally to abstract the page into methods that keeps code reusable and increase readability.  Something I often get stuck on how high of a level do I abstract something? So for example something like a login form (or really most forms for example).  I generally will code out something such as (This is in Cypress fwiw, but pretend it's in whatever automation framework of your choice. Code below is JavaScript):    setEmail(value) {     const field = cy.get('.form-control[name="username"]');     field.clear();     field.type(value);      return this;   }    setPassword(value) {     const field = cy.get('.form-control[name="password"]');     field.clear();     field.type(value);      return this;   }   Generally at this point is where I wonder "Hmmm should I go ahead and wrap this forms n inputs into a larger method such as":   login(email, password) {     this.setEmail(email);     this.setPassword(password);     this.submit();   }   Which at that point I question: "Why even bother writing the independent input methods".  So how do I decide when it's worth writing a large method that encompasses multiple other private methods...and if I write a larger "public" method should I even bother writing smaller private methods?  I read somewhere with PoM that we should:      Model user behaviour not user interfaces   When I think about that statement, especially when it comes to forms it feels like one "larger" method makes sense. The only real advantage I see to splitting them up is in case I need to test negative cases (Such as not all inputs are filled out for instance). Which can technically be conditionally added to a larger form (But can also be a pain when there are multiple inputs).  What is the best practice here?
So i've been working on a Page Object Model framework for a large web application for our current company. It's the first time i've made my own framework and implemented the page object model. Im using Ruby w/Capybara and Selenium-Webdriver for my language/driver of choice.  Currently i've divided each page (or obvious "section of the site") into a class file. This class file has methods for just about everything (or an API of sorts). The problem i've ran into is that I am literally writing a method for every single thing....and i've came across 2 ways people seem to do this:  Lets pretend for a section/page of the site is a widget creation form, the widget has a name/description and some sort of "type" dropdown. Also a save button to save the widget.  Option A (Which is what i've done so far): Make a method for each element (the save button, called save_widget, all the different inputs, etc...)  Option B: Have getter and setter methods for each element, then a larger method which uses these private getter and setter methods.   With Option A my test scripts end up being longer, and honestly not much different than using selenium calls themselves.   Option B would probably call one method (Such as create_widget which would pass in multiple items which that method would call all the smaller getter/setter methods). This would make the test script MUCH shorter and more abstracted. However the getter/setter methods would probably take more actual writing for the page objects themselves (but possibly easier to maintain).  Is there a certain style that favors one over the other? The more I think about it the more Option B seems better...but I wonder if in this case abstraction is a good thing.
Can "what kind" be plural? Is it correct to say, "What kind of patents are being issued in these sophisticated times?" It seems like it should be What kind of patents is being issued..., but that sounds wrong.  What kind of patent is being issued... is correct and sounds right, but loses a little bit of the original meaning.  Is there something magic about what kind that allows it to be plural, or do people just misuse it a lot? I've noticed this a few times on the Feed activity on the Android app, but never thought anything of it.  Why does this question (How To auto enable checkbox?) appear as "Unanswered" when there is an icon which denotes there are 5 answers, one of which has been marked as the answer?  Dragging down to refresh doesn't seem to clear the unanswered flag either.  Device: Nexus 5 How to modify the page at admin/structure/types? Mouse disappear in VirtualBox I am using latest version of VirtualBox (VirtualBox 4.3.6 for Windows hosts) and after installing any OS and clicking inside of it mouse disappear. It is not visible until I press right CRTL. Anyone know what can cause this problem. I have also installed extension pack. One definition of an  is:     An abbreviation formed by (usually initial) letters taken from a word or series of words, that is itself pronounced as a word, such as RAM, radar, or scuba; sometimes contrasted with initialism.   An  is:     A term formed from the initial letter or letters of several words or parts of words, but which is itself pronounced letter by letter.   If I pronounce an initialism, as a word, and not just as letters, does that 'make' it an acronym? How can I program a simple chat bot AI? Why this polynomial is irreducible? Let $K=\mathbb{Z}_p(t)$. How to prove $f(x)=x^p-t$ is irreducible in $K[x]$? Motion tracked Video doesn't show up in the render or in the compositing tab Crop simple features object in R How do I insert a tie (~, non-breaking space, tilde) under expl3 syntax? Image of the union is the union of the images $$ f\left(\bigcup\limits_{\lambda \in \wedge} A_{\lambda}\right) = \bigcup\limits_{\lambda \in \wedge} f(A_\lambda)$$  Let $b \in f(\bigcup\limits_{\lambda \in \wedge} A_{\lambda})$ $\rightarrow b=f(a)$ for some $a \in (\bigcup\limits_{\lambda \in \wedge} A_{\lambda})$.  Since $a \in (\bigcup\limits_{\lambda \in \wedge} A_{\lambda}) \rightarrow a \in A_{\lambda}$ for some $\lambda \in \wedge$.  Since $b=f(a)$, then $b \in f(A_{\lambda})$ for some $\lambda \in \wedge$.  $\rightarrow b \in \bigcup\limits_{\lambda \in \wedge} f(A_\lambda)$ $\rightarrow f(\bigcup\limits_{\lambda \in \wedge} A_{\lambda}) \subset \bigcup\limits_{\lambda \in \wedge} f(A_\lambda)$.  I used a similar argument to prove $\bigcup\limits_{\lambda \in \wedge} f(A_\lambda) \subset f(\bigcup\limits_{\lambda \in \wedge} A_{\lambda})$.  Which shows $ f(\bigcup\limits_{\lambda \in \wedge} A_{\lambda}) = \bigcup\limits_{\lambda \in \wedge} f(A_\lambda)$.  Please let me know if this is valid. Prove that ${x dy - y d x\over x^2 + y^2}$ is not exact When working with radios, I've seen the term "dBm". What does this mean?  The  gives a table showing the equivalent power in Watts. Is the dBm output just the power level of a transmitter?  How does this differ from signal strength measured in dB? I have a doubt on something. I have a theorem that says that if $R$ is a ring, then $R/I$ is a domain iff $I$ is prime. Since $X^2-1$ is note prime, $\mathbb Z[X]/(X^2-1)$ is not a domain. But, $X^2-1=(X-1)(X+1)$, and since $X-1$ and $X+1$ are prime in $\mathbb Z[X]$, there are coprime, and thus, by the chinese remainder $$\mathbb Z[X]/(X^2-1)\cong \mathbb Z[X]/(X-1)\times \mathbb Z[X]/(X+1),$$ since $\mathbb Z[X]/(X-1)\times \mathbb Z[X]/(X+1)$ is a domain, then so is $\mathbb Z[X/(X^2-1)$. What is the mistakes here ? How can I really disable the Cmd to Win key mapping in Parallels Desktop 5? Removed it from System Preferences &gt; Keyboard. No go. Remapped ⌘ Cmd to be Ctrl. No go. Ripping out the ⌘ Cmd key shouldn't be the solution. Anyone?... Consider the sentence      E-books are on the rise, but they haven't suppressed paper books though.    This usage seems to be quite common, but when I learned English  I was taught to use "however" where I now read "though". My questions on this use of "though" are:     Is this a new trend? Is it restricted to American English? Is "though"  considered more colloquial than "however" ?    And on a syntactic level: Do you put a comma before "though"? How to replace the_post_thumbnail template tag and show the first inside the post image instead How do you choose Spells Known when creating a new character above 1st level? full-screen browser window on load document How to play a YouTube clip in background/minimised?