summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: toaster/tests: Setup delay after driver action self.get(url)Alassane Yattara2024-01-101-0/+7
| | | | | | | | | Recurring test failures result from insufficient delays in driver actions. (Bitbake rev: b0de2a61d14fbf30e338751b285b3bab80192275) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: bug-fix An element matching "#projectstable" should ↵Alassane Yattara2024-01-011-0/+2
| | | | | | | | | be visible (Bitbake rev: 1edb97f741a48481b1b9f26c5cb31acd9059f07f) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: bug-fix element click intercepted in ↵Alassane Yattara2023-12-151-0/+14
| | | | | | | | | | | browser/test_layerdetails_page.py selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted (Bitbake rev: d1936616cafc1aced69c7b5758e44638eb62b5ac) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: fix chrome argument syntax and wait for driver exitAlexander Lussier-Cullen2023-12-151-1/+3
| | | | | | | | | | | | | The chrome driver sometimes fails with a page crash for a full suite of tests, pointing to a failure in the setup of the driver due to resource limitations. To mitigate these crashes, add a wait between driver driven tests to ensure resources are freed. (Bitbake rev: 8f998e27aae694c16f788aac12558621089d0839) Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Exit tests on chromedriver creation failureAlexander Lussier-Cullen2023-12-151-6/+8
| | | | | | | | | | | When failing to create the web driver session for selenium tests, a cascade of erroring tests will follow. To avoid processing these unnecessarily, exit the tests completely in this case. (Bitbake rev: 9327196102dd2671fcdb3200d9490e683f81d3a1) Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Add verbose printout for missing chrome(driver) dependenciesAlexander Lussier-Cullen2023-12-121-2/+21
| | | | | | | | | | | If the chrome driver binary is missing dependencies, it was near impossible to work out which ones from just the logs. Add code to help debug things if this happens by including the ldd output. (Bitbake rev: 0ffe5fccbb7db5aca5c409fe00be2be69a6e37d9) Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Update methods wait_until_~ to skip using time.sleepAlassane Yattara2023-12-021-5/+8
| | | | | | | | | | | Update Class Wait from selenium_helpers_base, to override wait_until_visible and wait_until_present with poll argument to better handle delay between driver actions (Bitbake rev: 486817ac6ad28580d81dcf6e3789678d9259bb54) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Revert "toaster: Bug-fix webdriver No parameter named options"Richard Purdie2023-11-091-1/+1
| | | | | | | | | This reverts commit 99305c25fafa61064a1bb0849616e4627e3453d7. After discussion we found various versions of selenium don't work with this change. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Bug-fix webdriver No parameter named optionsAlassane Yattara2023-11-091-1/+1
| | | | | | | | | Change options to chrome_options (Bitbake rev: 99305c25fafa61064a1bb0849616e4627e3453d7) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add tox.ini file to execute test suiteMarlon Rodriguez Garcia2023-10-301-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Updated tox file to fix enviroments variables. to run tox use the following command: tox -e env_name -c /path/to/file/tox.ini See tox cli https://tox.wiki/en/latest/cli_interface.html The variable env_name is linked to the python versions (py38, py39, py310). If env_name option is not set, the test suite will run for all indicated versions. It was also modified the webdriver options for chrome to run selenium test in console because of the error detected in the previous test run selenium.common.exceptions.SessionNotCreatedException: Message: session not created: Chrome failed to start: exited normally. (session not created: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (Bitbake rev: 11dfd7c05642269b7a8bff2918667348d041ec79) Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com> Changes in v2 - Updated variable path BUILDDIR and EVENTREPLAY_DIR to use enviroment value - Updated toaster-requirements.txt file path - Removed flake8 - Added webdriver options to chrome Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update selenium version and code syntaxMarlon Rodriguez Garcia2023-10-061-5/+4
| | | | | | | | | Updated selenium version to latest 4.13.0, changed selenum specific version syntax elements to accomplish test success (Bitbake rev: 868c88a249ef4b9fe5a891e76e25e054e4fcd994) Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib: remove unused importsFrazer Clews2020-01-191-1/+0
| | | | | | | | | | removed unused imports which made the code harder to read, and slightly but less efficient (Bitbake rev: 4367692a932ac135c5aa4f9f2a4e4f0150f76697) Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: toaster:tests: python -> python3Robert Yang2019-06-281-1/+1
| | | | | | (Bitbake rev: 683c24788d96176699a585055eb62d8a71830a12) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Strip old editor directives from file headersRichard Purdie2019-05-041-2/+0
| | | | | | | | | | There are much better ways to handle this and most editors shouldn't need this in modern times, drop the noise from the files. Its not consitently applied anyway. (Bitbake rev: 5e43070e3087d09aea2f459b033d035c5ef747d0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Drop duplicate license boilerplace textRichard Purdie2019-05-041-13/+0
| | | | | | | | | | With the introduction of SPDX-License-Identifier headers, we don't need a ton of header boilerplate in every file. Simplify the files and rely on the top level for the full licence text. (Bitbake rev: 695d84397b68cc003186e22f395caa378b06bc75) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Add initial pass of SPDX license headers to source codeRichard Purdie2019-05-041-0/+2
| | | | | | | | | | | | | | | | | This adds the SPDX-License-Identifier license headers to the majority of our source files to make it clearer exactly which license files are under. The bulk of the files are under GPL v2.0 with one found to be under V2.0 or later, some under MIT and some have dual license. There are some files which are potentially harder to classify where we've imported upstream code and those can be handled specifically in later commits. The COPYING file is replaced with LICENSE.X files which contain the full license texts. (Bitbake rev: ff237c33337f4da2ca06c3a2c49699bc26608a6b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: browser tests - add Selenium Docker container as driverbrian avery2016-12-071-2/+11
| | | | | | | | | | | | Adds the ability to specify a Selenium Docker container server as a driver. This allows for repeatable tests independent of host. Currently we assume you are using the Firefox container. Instructions are located in the README in tests/browser. (Bitbake rev: 7df842f8f8b2ae640109ed06729ab59c9469fc64) Signed-off-by: brian avery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/toaster: Fix missing new files from previous commitsRichard Purdie2016-08-011-0/+218
(Bitbake rev: f77e6f21a2cc57a3fcb5970437e55cfae39849a3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>