Jump to content
UBot Underground

Recommended Posts

Hello everyone, I'm new here ... I would like to help with a command "define". I have a button on a html panel, which runs a script of a "define". what happens is that the first time I press the button, everything is perfect, however when I press the button again it does not run correctly, I do not know if I need to stop the script with a "return" or if there is a command to reset the define ?, is some kind of cache? I do not know what else to do.

Edited by Emanu2000
Link to post
Share on other sites

not sure you code

try

ui html panel("<button name=\"replacethis\" onclick=\"ubot.runScript(\'Search Google\')\">BUTTON 1</button>",200)
define Search Google {
    alert("Hi")
}

it work all time?

Link to post
Share on other sites

I think what may be happening is that my script is too long, and has detected that is after he runs a part where there are some interactions with elements in the browser, then he no longer works when it is activated for the second time. My script contains commands Some interaction with external windows system, such as sending files and I suspect that the problem can be when he goes through that part.

 

Your example is simple and it works perfectly.

Edited by Emanu2000
Link to post
Share on other sites

You have to make sure the script contains everything it needs to run. Make sure it navigates to the correct page, clears lists if necessary and switches variables back to where they should be. Also you may want to make a true or false variable to see if the script is currently running to avoid issues. Only continue to run the script if the variable is set to false (or true, whatever you want it to be set as).

Link to post
Share on other sites
it's all right in my code, what I discovered is that the browser UBot (chrome 39) this freezing when my routine interacts with an ajax element on the page. from there he can not recognize any more element and interact with him only when they give a refresh by navigating to another page and then back to the page again, then the browser "unlock".

 

thanks for the help of all, I believe it to be a bug in the browser, someone from the development team could do some tests with more "heavy" pages involving ajax elements to see if this problem persists.

Link to post
Share on other sites

 

it's all right in my code, what I discovered is that the browser UBot (chrome 39) this freezing when my routine interacts with an ajax element on the page. from there he can not recognize any more element and interact with him only when they give a refresh by navigating to another page and then back to the page again, then the browser "unlock".
 
thanks for the help of all, I believe it to be a bug in the browser, someone from the development team could do some tests with more "heavy" pages involving ajax elements to see if this problem persists.

 

 

same problem here,

You are right about navigating to another page to "unlock" the browser, but in my case sometimes it doesnt solve the problem. The browser still "lock" (document text are null/empty).

Other solution that work for me is Reset Browser. But it reset everything include your login session.

 

Lately i also found another solution, step by step below:

 

1. Identify all js that load on your page. Choose js that needed by the page, and ignore another js about tracking: like facebook event manager, google analytics, google tag manager, sociomantic, etc)

2. Disable all js completely (Allow Javascript - No)

3. Load the js locally in ubot (Run Javascript) after navigate to the page

 

With this way, i can minimize the browser "lock"

HTH

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...