Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
1.9 kB
8
Indexable
Never
${cards}    Get Card Names From File
    Get To Card Market
    FOR    ${card}    IN    @{cards}
        input text    name=searchString  ${card}
        #click element    xpath=//*[@id="ExpansionSection"]/div[2]/div/div
        #wait until element contains   xpath=//*[@id="ExpansionSection"]/div[2]/div/div    The Lord of the Rings: Tales of Middle-earth
        click element    search-btn
        wait until page contains    Search Results
        click element    name=idExpansion
        select from list by value    name=idExpansion    5285
        click button    Search
        #Collect Card Prices
        #wait until page contains    ${card}
        ${result}    page should contain    ${card}
        IF  ${result} == True
            click link    ${card}
            #wait until page contains    Product Availability
            ${price}    get text    xpath=//*[@id="tabContent-info"]/div/div[2]/div/div[2]/dl/dd[7]/span
            ${collector_number}    get text    xpath=//*[@id="tabContent-info"]/div/div[2]/div/div[2]/dl/dd[2]
            log   Price for ${collector_number}, ${card}: ${price}
            append to file    ${CARD_PRICES_FILE}    ${collector_number}, ${card}: ${price} ${\n}
        ELSE
            Send Notification On Slack
            execute manual step    Human interraction needed now!       It's fucked!
            click link    ${card}
            #wait until page contains    Product Availability
            ${price}    get text    xpath=//*[@id="tabContent-info"]/div/div[2]/div/div[2]/dl/dd[7]/span
            ${collector_number}    get text    xpath=//*[@id="tabContent-info"]/div/div[2]/div/div[2]/dl/dd[2]
            log   Price for ${collector_number}, ${card}: ${price}
            append to file    ${CARD_PRICES_FILE}    ${collector_number}, ${card}: ${price} ${\n}
        END
    END
Leave a Comment