How to open firefox and specific URL

Discuss RoboTask here
mspeter
Posts: 6
Joined: Mon Sep 15, 2008 8:24 am
Location: United States

How to open firefox and specific URL

Post by mspeter »

I have searched for help on how to setup a robotask job to open a web browser like firefox at a specific start time, go to a specific url, and then select a button on that page to start live streaming of the broadcast. I would then like to record the broadcast for a set amount of time and then quit. I have the recorder program that I need to run once the broadcast is playing.  I have tried but i am clueless on how to do this in robotask. I have searched for samples but have not found one that even shows how to open a browser let alone go to a specific url. Can anyone help get me started please. I didn't think I was so ignorant but this program has set me back aways.Thanks everyone.
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

How to open firefox and specific URL

Post by Oleg »

Use the "Run Program/Open Document" action
Put the desired link into "Program or document name" field, like this:
http://www.robotask.com/

RoboTask will open the default browser and go to the specified URL.
Next, you have to wait some time when the page will be loaded and do another steps you want.

BTW: you can see this in example "[DEMO] Go to Robotask home page"
mspeter
Posts: 6
Joined: Mon Sep 15, 2008 8:24 am
Location: United States

How to open firefox and specific URL

Post by mspeter »

Thank you Oleg.  I appreciate your help.  I have scoured the forums looking for direction but found none for what I am trying to do. I also re-checked the home page and havent found this example in demo yet either. i will look again.one last question please.  once i get to www.kfyi.com, how do i get robotask to  navigate their page and select the "listen live" button - or any other button for that matter.  This would be very helpful to know regardless of the web page - like ebay for instance. again, how do you move the mouse around with robotask to select a specific option on a web page. thank you very very much.mike(by the way, I assume you are in russia - what city? we visited moscow and veronezh a couple years ago and adopted a beautiful little girl there)
mspeter
Posts: 6
Joined: Mon Sep 15, 2008 8:24 am
Location: United States

How to open firefox and specific URL

Post by mspeter »

i am continuing to review the samples and can't seem to figure out how to answer pop up questions from web sites or to make specific selections on web pages. I will keep looking and trying - thanks for any guidance.
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

How to open firefox and specific URL

Post by Oleg »

Unfortunately, it's very difficult to automate the web pages, because there is no universal algorithm.
You may try to use sending keystrokes, and mouse actions.

But pay attention that RoboTask doesn't recognize the elements of web page, and you can move mouse cursor only by coordinates.
mspeter
Posts: 6
Joined: Mon Sep 15, 2008 8:24 am
Location: United States

How to open firefox and specific URL

Post by mspeter »

Oleg,I thank you for your assistance so far butg I have to say I have reached the limit of my frustration.  I have spent two days trying to get robotask to go to www.kfyi.com and start the streaming audio. Thanks to you I can get the web browser to open but that is as far as I have gotten.  This seems like it should be a fairly simple task but either i am stupid or ???   i have tried every mouse command to get the cursor to move over the listen live button; both relative and absolute. Nothing I have done has even moved it.  I have tried every code i can think of to get it to go to that button and run the java script OpenStreamingPlayer - no success.   I will ask you one more time for help before I uninstall robotask and forget about the hours I have wasted so far.  I'll wait a couple days to see if you respond. I understand if you don't. Thanks again and best wishes.
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

How to open firefox and specific URL

Post by Oleg »

See my example below
But remember that this task valid only to my web browser, my screen resolution, and only for the current design of the site.

Code: Select all

;*****************************
;* RoboTask Task file         
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|136300744
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task698"
Hide=INTEGER|0
ID=INTEGER|223771802
Name=STRING|"Run ""www.kfyi.com "" (for FF)"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER

[Actions\Action1]
ActionID=STRING|"A_GENERAL_RUN_PROG"
Enabled=INTEGER|-1
Name=STRING|"Run ""fireFox """
Params=FOLDER

[Actions\Action1\Params]
program=STRING|"fireFox"
runas=STRING|"2"
wait=STRING|"0"

[Actions\Action2]
ActionID=STRING|"A_GENERAL_PAUSE"
Enabled=INTEGER|-1
Name=STRING|"Delay 1000 ms"
Params=FOLDER

[Actions\Action2\Params]
delay=STRING|"10"

[Actions\Action3]
ActionID=STRING|"A_GENERAL_RUN_PROG"
Enabled=INTEGER|-1
Name=STRING|"Run ""//www.kfyi.com/ """
Params=FOLDER

[Actions\Action3\Params]
program=STRING|"http://www.kfyi.com/"
runas=STRING|"2"
wait=STRING|"0"

[Actions\Action4]
ActionID=STRING|"A_GENERAL_PAUSE"
Enabled=INTEGER|-1
Name=STRING|"Delay 10000 ms"
Params=FOLDER

[Actions\Action4\Params]
delay=STRING|"100"

[Actions\Action5]
ActionID=STRING|"A_MOUSE_MOVE"
Enabled=INTEGER|-1
Name=STRING|"Move"
Params=FOLDER

[Actions\Action5\Params]
dx=STRING|"626"
dy=STRING|"410"
mode=STRING|"0"

[Actions\Action6]
ActionID=STRING|"A_MOUSE_CLICK"
Enabled=INTEGER|-1
Name=STRING|"Click left button"
Params=FOLDER

[Actions\Action6\Params]
action=STRING|"0"
button=STRING|"0"

[Actions\Action7]
ActionID=STRING|"A_GENERAL_PAUSE"
Enabled=INTEGER|-1
Name=STRING|"Delay 200 ms"
Params=FOLDER

[Actions\Action7\Params]
delay=STRING|"2"

[Actions\Action8]
ActionID=STRING|"A_GENERAL_SENDKEYS"
Enabled=INTEGER|-1
Name=STRING|"Send keys to active window"
Params=FOLDER

[Actions\Action8\Params]
currentwindow=STRING|"1"
fixedwindow=STRING|"1"
keylayout=STRING|"0"
keys=STRING|"""{TAB}{TAB}{DELAY 100}{Enter}"""
sendkind=STRING|"0"
wincaption=STRING|"Notepad"

Last edited by Oleg on Fri Sep 19, 2008 5:48 am, edited 1 time in total.
affmanager
Posts: 8
Joined: Sat Oct 04, 2008 10:59 am

How to open firefox and specific URL

Post by affmanager »

Oleg,I am trying to do the same thing as mspeter. The example you gave (above) that logs into www.kfyi.com using Firefox -- how does one test that file? I'd like to use that code to access a different url and click on a certain link. I understand that web sites differ and this is a difficult process, but if I could get started by emulating what you have done with this file it would really help.It's too bad that it's difficult to automate web pages, but that's exactly what I need to do with Robotask. So I could really use some help.Thank you,Affmanager
mspeter
Posts: 6
Joined: Mon Sep 15, 2008 8:24 am
Location: United States

How to open firefox and specific URL

Post by mspeter »

Affmanager,glad to see someone else is trying to figure this out. Frankly I gave up. I was not even able to figure out where to put the coding that Oleg provided. I was not able to figure anything out using help either.  If you care to give a couple intro steps so I could at least get started I would be grateful. again, i'm not even sure where to start putting the code he provided. thanks in advance if you are willing.
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

How to open firefox and specific URL

Post by Oleg »

I was not even able to figure out where to put the coding that Oleg provided.
Save the text of the task to file. (e.g. sample.tsk)
Use main menu of RoboTask : Task | Import in order to import into RoboTask
Post Reply