Skip to content

Instantly share code, notes, and snippets.

@bbchriscesar
Created December 20, 2020 04:41
Show Gist options
  • Select an option

  • Save bbchriscesar/cd009f855d4fca8a0d91a4f6ad0e3e1b to your computer and use it in GitHub Desktop.

Select an option

Save bbchriscesar/cd009f855d4fca8a0d91a4f6ad0e3e1b to your computer and use it in GitHub Desktop.
from Common import mWebBaseClass as ss
import pytest
import os
@pytest.mark.parametrize("lang, udid, systemPort", [
("en-US,ja,ko,id", "FA7BP1A03027", "8201")
]
)
def test_AndroidTestCase(lang, udid, systemPort):
for lang in lang.split(","):
ss.setupDriver(udid, systemPort)
path = '/Users/christiannec/PycharmProjects/AndroidProjects/Screenshots/Sample/' + lang
if not os.path.exists(path):
os.makedirs(path)
# Start your script here...
ss.navigateToURL('https://news.google.com/?hl=' + lang)
ss.customDelay(3)
ss.takeScreenshot(path + '/' +'mobileWeb1')
ss.pageDown()
ss.takeScreenshot(path + '/' + 'mobileWeb2')
ss.tearDown()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment