Jump to content



Photo

Clicking Button That Seems To Be Java Script

javascript button click

  • Please log in to reply
3 replies to this topic

#1 golfer57

golfer57

    Member

  • Fellow UBotter
  • PipPip
  • 21 posts
  • LocationNew Mexico
  • OS:Windows 7
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Professional Edition

Posted 14 February 2017 - 07:52 AM

/thanks for you help with the other project but i have another question. this one have to do with javascript from the site scribed. i have everything done right up to the part where i have to click this button or drag the file in order for it to upload. once i get the pdf file, i can then upload it. but i cant get the buttom to get the file to click. i think it is javascript. here is the code that i have so far,any advice would be greatly appreciated. i just need to kknow how to work withth e javascript button to upload the file: here is the code: 

navigate("https://www.scribd.com/","Wait")
click($element offset( ,0),"Left Click","No")
set(#email,"gmail","Global")
set(#pw,"password","Global")
type text(,#email,"Standard")
type text(,#pw,"Standard")
click($element offset(,2),"Left Click","No")
wait(5)
click(,"Left Click","No")
ui open file("PDF to Upload",#pdfdoc)

i have an account with scribed but in the code i just wrote the gmail and then the pw.  i think you don't need them, but i did not want to put them in here since this is public.   Thanks for the help in advance.  i have been going thru the 30 day training and i have not found anything in there about java and how it works with ubot, was hoping to find something but no luck.  maybe i missed it, so if you can guide me in your training, that would be great.

 

I am not sure how to work with Java at all.  Is there anywhere where i can learn more about java and ubot?  i tried to check it out online and youtube, but did not help much.  any guidance on how to learn how to work with java and ubot the advice is greatly appreciated.  this is new to me and all the training that i have been watching does not talk about it at all. test pdf is attached that you can use.

Attached Files



#2 HelloInsomnia

HelloInsomnia

    Advanced Member

  • Moderators
  • 3313 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 14 February 2017 - 08:43 AM

Could you possibly post the code again? I edited the post to make the code more readable but it may have removed some parts of the script.
 
Edit: Since I maybe made that mistake I recreated the code to get you to that page and try to upload:
 
ui text box("Email:",#email)
ui password("Password:",#password)
ui open file("File:",#file)
navigate("https://www.scribd.com/","Wait")
click($element offset(<login link>,0),"Left Click","No")
wait for element(<class="login_alt">,"","Appear")
wait(2)
type text(<email field>,#email,"Standard")
type text(<password field>,#password,"Standard")
click($element offset(<login button>,3),"Left Click","No")
wait for element($element offset(<class="icon_btn_text">,1),"","Appear")
wait(2)
click($element offset(<class="icon_btn_text">,1),"Left Click","No")
wait for element(<class="upload_box">,"","Appear")
wait(2)
change file field(<type="file">,#file)

It won't upload with just that code, I'll have to come back later and take another look or maybe somebody else can. I am not sure why it won't work yet but typically that is how you would do it.



#3 golfer57

golfer57

    Member

  • Fellow UBotter
  • PipPip
  • 21 posts
  • LocationNew Mexico
  • OS:Windows 7
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Professional Edition

Posted 14 February 2017 - 03:08 PM

Yea, i usually have no problems with clicking buttons, but this is not working for sure, any help please, can someone help out with the solution?  Is this a javascript button?



#4 tinku

tinku

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts
  • LocationIndia
  • OS:Windows 8
  • Total Memory:4Gb
  • Framework:v4.5+, unsure
  • License:Professional Edition

Posted 07 April 2017 - 11:27 AM

I am facing the same problem the website which have Java script to upload file or drag and drop option it's a bit diffcult to upload file anyone can help me ?





Also tagged with one or more of these keywords: javascript, button, click

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users