Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create AltDriverUnity and AltDriverUnreal and FindObject wrappers that use AltBy to find objects #1721

Open
rucindrea opened this issue Dec 4, 2024 · 2 comments · May be fixed by #1723
Open
Assignees

Comments

@rucindrea
Copy link
Contributor

rucindrea commented Dec 4, 2024

Description

For POM structures, it's best to save locators in the following format:
private (By, string) elementLocator = (By.XPATH, "//path/to//object")

and then use them for all the find object related methods.

This approach is better because it allows the user to not only change the locator value, but also the strategy without changing anything else in the code.

===========

After finding out that in Python we cannot have multiple methods with the same name even if they have different signatures, we agreed that a better approach would be to create 2 new AltDrivers, one for Unity and one for Unreal, which would anyway have some specific methods for each platform, and these 2 drivers would also have different methods for finding objects that would use the AltBy objects as locators.

@rucindrea
Copy link
Contributor Author

I decided to create an AltBy class in all the bindings (except Robot) to allow for the following format:

        private AltBy element1 = AltBy.name("Capsule");
        private AltBy element2 = AltBy.path("//Capsule");
        private AltBy element3 = AltBy.text("Capsule Info");

and then use them as:

altDriver.FindObject(element1);

this is similar to how Selenium Webdriver clients have been implemented.

@rucindrea rucindrea self-assigned this Dec 8, 2024
@rucindrea rucindrea changed the title Create FindObject wrappers that use (By, value) tuples to find objects Create AltDriverUnity and AltDriverUnreal and FindObject wrappers that use AltBy to find objects Dec 14, 2024
@andreion1ca
Copy link
Contributor

AltTester Unreal SDK vs AltTester Unity SDK

Find Objects

The following commands don't need cameraBy and cameraValue parameters in the Unreal SDK (they are not implemented yet):

  • FindObject
  • FindObjects
  • FindObjectWhichContains
  • FindObjectsWhichContain
  • GetAllElements
  • WaitForObject
  • WaitForObjectWhichContains
  • WaitForObjectNotBePresent

Input Actions

The following commands don't need power parameters in the Unreal SDK (is not implemented yet):

  • KeyDown
  • PressKey
  • PressKeys

The following commands are not implemented in Unreal SDK:

  • HoldButton
  • MoveMouse
  • Scroll
  • Swipe
  • MultipointSwipe
  • Tap
  • Tilt
  • ResetInput

Unity Commands

All commands related to PlayerPrefs are not implemented in Unreal SDK (no other similar system is implemented for Unreal SDK).

The following commands should be renamed in Unreal SDK:

Unity SDK Unreal SDK
GetCurrnetScene GetCurrentLevel
LoadScene LoadLevel
WaitForCurrentSceneToBe WaitForCurrentLevelToBe
GetTimeScale GetGlobalTimeDilation
SetTimeScale SetGlobalTimeDilation

The following commands are not implemented or are not working in Unreal SDK:

  • UnloadScene
  • GetAllLoadedScenese

The following command doesn't need assemblyName parameter in the Unreal SDK:

  • CallStaticMethod

The following commands are not applicable in Unreal SDK:

  • GetStaticProperty
  • SetStaticProperty

The SetServerLogging command is not implemented in Unreal SDK.

AltObject

The following command doesn't need assemblyName and maxDepth (where exists) parameters in Unreal SDK:

  • CallComponentMethod
  • SetComponentProperty
  • WaitForComponentProperty
  • GetComponentProperty

The SetText command doesn't need submit parameter in Unreal SDK (not implemented yet).

The following commands are not implemented in Unreal SDK:

  • Tap
  • PointerDown
  • PointerUp
  • PointerEnter
  • PointerExit
  • GetVisualElementProperty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants