diff --git a/.github/workflows/build-latest-preview.yml b/.github/workflows/build-latest-preview.yml index 6e7065591..39c6a9efd 100644 --- a/.github/workflows/build-latest-preview.yml +++ b/.github/workflows/build-latest-preview.yml @@ -28,12 +28,14 @@ jobs: run: | mv -f minibrowser-Debug/debug/minibrowser-debug.apk minibrowser-latest.apk mv -f mediaplayer-Debug/debug/mediaplayer-debug.apk mediaplayer-latest.apk + mv -f webdriver-Debug/debug/webdriver-debug.apk webdriver-latest.apk - name: Delete Artifacts uses: geekyeggo/delete-artifact@v2 with: name: | minibrowser-Debug mediaplayer-Debug + webdriver-Debug - name: Upload Latest Preview Files uses: softprops/action-gh-release@v1 with: @@ -43,3 +45,4 @@ jobs: files: | minibrowser-latest.apk mediaplayer-latest.apk + webdriver-latest.apk diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2699a3e78..d2d2cfc9c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,3 +69,8 @@ jobs: with: name: mediaplayer-${{ inputs.build_type }} path: tools/mediaplayer/build/outputs/apk/**/*.apk + - name: Save WebDriver Artifacts + uses: actions/upload-artifact@v3 + with: + name: webdriver-${{ inputs.build_type }} + path: tools/webdriver/build/outputs/apk/**/*.apk diff --git a/README.md b/README.md index 1967955e4..75a4df2b4 100644 --- a/README.md +++ b/README.md @@ -87,24 +87,12 @@ Once the bootstrap process is done and all the dependencies are cross-compiled a you should be able to open the `launcher` demo with Android Studio and run it on a real device. ## WebDriver -WebDriver support is not yet included in prebuilt packages but wpewebkit needs to be compile -manually for now and only x86-64 emulator environment is supported. -### 1. Build wpewebkit with webdriver support -Go to [cerbero](https://github.com/Igalia/cerbero) repository clone and issue +Following demostrates how to run a simple webdriver script on emulator -```bash -./cerbero-uninstalled -c config/cross-android-x86-64.cbc bootstrap -./cerbero-uninstalled -c config/cross-android-x86-64.cbc package wpewebkit -``` -### 2. Bootstrap wpe-android with webdriver enabled wpewebkit -In wpe-android directory issue +### 1. Create python virtual environment for Selenium -```bash -./tools/scripts/bootstrap.py --arch x86_64 -c -``` -### 3. Create python virtual environment for selenium -Create directory for selenium (to any location you want) +Create directory for Selenium (to any location you want) ```bash python3 -m venv venv @@ -112,7 +100,9 @@ source venv/bin/activate pip install selenium ``` -Save following as run_test.py +### 2. Create python Selenium script + +Save following as simple_test.py ```bash from selenium import webdriver @@ -127,21 +117,23 @@ del(options._caps["platform"]) del(options._caps["version"]) driver = webdriver.Remote(command_executor="http://127.0.0.1:8888", options=options) -driver.get('http://www.google.com') +driver.get('http://www.wpewebkit.org') driver.quit() ``` -### 4. Run webdriver application +### 3. Run webdriver application on emulator + From android studio run webdriver application on x86-64 emulator. -After emulator has started issue fullowing +After emulator has started issue following on terminal ```bash adb forward tcp:8888 tcp:8888 ``` -### 5. Run WebDriver Selenium tests -In selenium directory created previously run +### 4. Run WebDriver Selenium tests + +From Selenium directory created previously run ```bash -python3 ./run_test.py +python3 ./simple_test.py ``` ## Known issues and limitations