Exemplo n.º 1
0
def beginCapturing(prefix):
    click(btnRandomClick)

    #choose todays paper
    press(TAB)
    press(ENTER)
    sleep(8)
    IfPurchasepage()

    #frontpage of paper - Screenshot 1
    printMessage("Capturing todays frontpage...")
    click(btnCapture)
    click(btnNextPage)
    sleep(8)

    #spreadview - Screenshot 2
    printMessage("Capturing spreadview...")
    click(btnCapture)

    #articleview - Screenshot 3
    xml = xmlparser.xmlParse_server_xml_todayspaper(prefix)

    #Hvis avis har sections og article view
    if xmlparser.xmlParse_server_has_sections(xml) and xmlparser.xmlParse_server_has_articles(xml):
        printMessage(prefix + " has sections and articles")
        btnArticleView = Point(x=865, y=470)

    #Hvis avis kun har article view (og pages)
    elif xmlparser.xmlParse_server_has_articles(xml):
        printMessage(prefix + " has articles only")
        btnArticleView = Point(x=865, y=415)

    #Hvis avis slet ikke har article view, tag ikke screenshot
    else:
        printMessage(prefix + " has NOT sections or articles")
        btnArticleView = None

    if btnArticleView is not None:
        rightclick(btnNextPage)
        sleep(8)
        click(btnArticleView)
        sleep(8)
        printMessage("Capturing articleview...")
        click(btnCapture)
    
    click(btnBack)
    sleep(8)
    
    #pageoverview - Screenshot 4
    # OBS OBS
    #click(btnCapture) # UDKOMMENTERE HER
    rightclick(btnBack)
    printMessage("Capturing pageview...")
    click(btnCapture)
    
    #startpage - Screenshot 5
    printMessage("Capturing kioskpage...")
    click(btnHome)
    sleep(8)
    click(btnCapture)
Exemplo n.º 2
0
def beginCapturing(prefix):
    printMessage("Ready!")
    
    Config.auto_wait_enabled = True
    nextPage = Window(Emulator).right - (30,0)
    previousPage = Window(Emulator).left + (30,0)

    click(Window(Emulator).center)
    sleep(8)
    click(nextPage)
    sleep(8)
    #Capture SpreadPage
    printMessage("Capturing SpreadPage...")
    captureScreenshot()
    
    xml = xmlparser.xmlParse_server_xml_todayspaper(prefix)

    #Hvis avis har sections og article view
    if xmlparser.xmlParse_server_has_sections(xml) and xmlparser.xmlParse_server_has_articles(xml):
        printMessage(prefix + " has sections and articles")
        btnArticleView = Point(x=140, y=580)

    #Hvis avis kun har article view (og pages)
    elif xmlparser.xmlParse_server_has_articles(xml):
        printMessage(prefix + " has articles only")
        btnArticleView = Point(x=170, y=580)

    #Hvis avis slet ikke har article view, tag ikke screenshot
    else:
        printMessage(prefix + " has NOT sections or articles")
        btnArticleView = None

    if btnArticleView is not None:
        click(btnThreeDotsPanel)
        click(btnArticleView)
        sleep(8)
        click(Window(Emulator).center)
        sleep(8)
        #Capture from Article View
        printMessage("Capturing Article View...")
        captureScreenshot()
        #Capture list from Article View
        click(btnBackInApp)
        printMessage("Capturing Article List from Article View...")
        captureScreenshot()
        click(btnDeviceBack)


    if xmlparser.xmlParse_server_has_sections(xml) and xmlparser.xmlParse_server_has_articles(xml):
        btnPageOverview = Point(x=260, y=580)

    elif xmlparser.xmlParse_server_has_articles(xml):
        btnPageOverview = Point(x=230, y=580)

    else:
        btnPageOverview = Point(x=200, y=580)

    click(btnThreeDotsPanel)
    click(btnPageOverview)
    sleep(8)
    #Capture Page overview
    printMessage("Capturing Page Overview...")
    captureScreenshot()

    click(btnDeviceBack)
    sleep(8)
    click(btnDeviceBack)
    click(btnThreeDotsPanel)
    click(btnSearchFromDotsPanel)
    #Capture Search function from coverflow
    printMessage("Capturing search function...")
    captureScreenshot()

    """