I suggest you ...

Expose TestObject property of PageObject class as "protected"

Sometimes when writing actions on a PageObject, it is necessary to run some javascript or perform other operations that can only be done through the Provider (IWebDriver).

The test class holds (or provides access to) the active web driver, Provider, through its public "Provider" property. The PageObject accepts a constructor parameter of type FluentTest which it stores in a private "TestObject" property.

Unfortunately, the "TestObject" property is private, so is not accessible to any PageObject subclasses.

The awkwardness associated with keeping "Provider" dependent actions encapsulated in the relevant PageObject could be sorted out if the "TestObject" property on the "PageObject" is made public -- or at least protected.

6 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Xeri MajiXeri Maji shared this idea  ·   ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base