Jump to content

_FFClick doesn't work on button?


 Share

Recommended Posts

So there's a simple problem:

an object to click:

<button class=" yt-uix-button yt-uix-button-urgent uploader-overlay-visible" onclick="yt.analytics.urchinTracker('/Events/UploadPage/UploadButton');;return false;" id="start-upload-button" type="button"><span class="yt-uix-button-content">Prześlij film wideo</span></button>

and this doesn't work:

_FFClick("start-upload-button", "id")

here's log:

_FFConnect: OS: WIN_7 WIN32_NT 7600 
_FFConnect: AutoIt: 3.3.2.0
_FFConnect: FF.au3: 0.6.0.1b-3
_FFConnect: IP: 127.0.0.1
_FFConnect: Port:   4242
_FFConnect: Delay:  2ms
_FFConnect: Socket:     540
_FFConnect: Browser:    Mozilla/5.0 (Windows; U; Windows NT 6.1; pl; rv:1.9.2.10) Gecko/20100914 BTRS27649 Firefox/3.6.10
__FFSendJavascripts: Sending functions to FireFox .......... done
__FFSend: try{FFau3.simulateEvent(FFau3.WCD.getElementById('start-upload-button'),'MouseEvents','click');}catch(e){'_FFCmd_Err';};
__FFRecv: 1
_FFLoadWait: . loaded in 10ms
>Exit code: 0    Time: 1.718

this one doesn't work too:

_FFClick(_FFXPath("//*[@id='start-upload-button']"))

log:

_FFConnect: OS: WIN_7 WIN32_NT 7600 
_FFConnect: AutoIt: 3.3.2.0
_FFConnect: FF.au3: 0.6.0.1b-3
_FFConnect: IP: 127.0.0.1
_FFConnect: Port:   4242
_FFConnect: Delay:  2ms
_FFConnect: Socket:     540
_FFConnect: Browser:    Mozilla/5.0 (Windows; U; Windows NT 6.1; pl; rv:1.9.2.10) Gecko/20100914 BTRS27649 Firefox/3.6.10
__FFSendJavascripts: Sending functions to FireFox .......... done
__FFSend: FFau3.xpath=null;try{FFau3.xpath=FFau3.WCD.evaluate("//*[@id='start-upload-button']",FFau3.WCD,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;}catch(e){'_FFXPath_Error: '+e;};

__FFWaitForRepl ==> MozRepl Exception: !!! [Exception... "Component is not available"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"
__FFSend: ;
__FFRecv: 
__FFSend: try{FFau3.simulateEvent(FFau3.xpath,'MouseEvents','click');}catch(e){'_FFCmd_Err';};
__FFRecv: 1
_FFLoadWait: . loaded in 10ms

MozRepl installed ofc, FF Connected and ff.au3 included.

Link to comment
Share on other sites

Hello Makalele,

It appears you are calling the name tag from the element, not the control id. You might want to try this instead:

_FFClick("start-upload-button", "name")

I found the documentation on _FFClick() here, and the full FF.au3 documentation in English here

Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

Link to comment
Share on other sites

I believe automation in YT services is against YouTube's terms of usage.

Dispatching event on this button is blocked by youtube's itself - scripts preventing 'botting/hacking/automation' are the main reason of this topic. So I refuse finding solution and...

I report this topic.

Edited by 4ggr35510n
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...