Using RobotFramework and Selenium Library.
By default, it uses the iPhone XR mobile emulator from Chrome
It is divided in two folders:
Test: Directory containing the different directories with different testTest/FunctionalTestSuite: Contain the.robotfiles with the actual test case.VideoSearch_iOS.robot: The file containing the test case running mobile iOS devices.VideoSearch_Android.robot: The file containing the test case running mobile Android devices.Resources: contain code need it for all test cases, the resources will avoid duplication and help with maintenance in the future, since all common keywords are here.Resources/Search/Search.robot: The custom keyword that are used to perform the searchResources/DefineMobileBrowser.robotandResources/HandleModalStreamingScreen.robotConfiguration adn keywords that can be use in other test cases.Results: contain the output files and the screenshot.
| Date | Comment |
|---|---|
| 2022/07/15 | Modification in structure, Main Risk: duplication on Test execution -> concider templates |
It requires the follow libraries.
- robotframework>=5.0.1
- robotframework-seleniumlibrary>=6.0.0
- It required Chromedriver
- Go to https://www.twitch.tv
- Click in Search button.
- Search for "Monster Hunter World".
- Switch to Channels tab.
- Scroll down.
- Search for "CervelloneRe" if no find choose random channel.
- Close lightweight modal message.
- If present click in start watching (Content Warning).
- Wait for 5 seconds.
- Take snapshot.
- Since there is not an APK the emulation is down by using the mobile emulator of chrome.
- The Mobile emulator interfere with the JavaScript execution, which doesn't allow the usage of
window.scrollTo(x-coord, y-coord). To perform the scroll down I use tabs, by navigating with tabs one can scroll down, however it is not an optimal solution, a better approach will be by creating a custom library.- Modification to the scrolling. implementing:
- Select last item in the list of videos.
- Scroll into view.
- New videos enter the DOM.
- Get new list of videos. the last video in the list will be different than previous iteration
- Repeat proces
Not final implementation but is more robust and reusable than scrolling base in tabs
- Modification to the scrolling. implementing:
