Jump to content
UBot Underground

Recommended Posts

I am working on a program that runs fine the first time.
If I run it again it gives an error.

I have to exit ubot and rerun the program to get it to run without error.

It seems to get the error on the add list to list.

I have tried clearing the variables but that does not stop the error.

 

http://ed-newman.com/images/uboterr2017-01-30_0814.png

set(#url,"https://sellercentral.amazon.com/hz/inventory?noRedirect=true&viewId=FBAKNIGHTS&tbla_myitable=sort:%7B%22sortOrder%22%3A%22DESCENDING%22%2C%22sortedColumnId%22%3A%22date%22%7D;search:;pagination:1;","Global")
browse(#url)
if($exists(<login button>)) {
    then {
        wait(1)
        change attribute(<email field>,"value","xxxxx")
        wait(1)
        change attribute(<password field>,"value","xxxxx")
        wait(1)
        click(<login button>,"Left Click","No")
        wait(1)
        browse(#url)
    }
}
wait(5)
set(#exit,0,"Global")
loop while($comparison(#exit,"=",0)) {
    clear list(%lines)
    add list to list(%lines,$page scrape("-status-status\" data-column=\"status\"","data-a-class=\"main-entry mt-button mt-dropdown mt-save-dropdown\""),"Delete","Global")
    loop($list total(%lines)) {
        set(#line,$next list item(%lines),"Global")
        set(#sku,$find regular expression(#line,"(?<=DisplayEditProduct\\?sku=)(.*?)(?=&)"),"Global")
        stop script
    }
    set(#exit,1,"Global")
    if($exists(<innertext="Next→">)) {
        then {
            click(<innertext="Next→">,"Left Click","No")
            wait for browser event("DOM Ready","")
            wait for browser event("Everything Loaded","")
            wait(10)
            set(#exit,0,"Global")
        }
    }
}
define browse(#website) {
    navigate(#website,"Wait")
    wait for browser event("DOM Ready","")
    wait for browser event("Everything Loaded","")
    wait(3)
}
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...