Help - multithreading, systemcall..

  • Thread starter Idealone Ideally
  • Start date
I

Idealone Ideally

Hi All,

I am newbie to ruby,
I have one doubt pertaining to system call and starting my server.
I use the system call --> system("D:\ruby\bin\selenium.cmd")
This starts a server followed by which i would be calling all the
methods in my code.
But until the first part of system call ends, i am not able to go to
successive methods.
I cant stop the server and then start calling other methods since all
methods require server to be up & running.
My question is , Can i start the server and keep it active plus it comes
out of the system call and start executing other methods respectively.

Let me know if you require any more information on this issue.

Thanks in Advance
 
R

Robert Klemme

2008/2/4 said:
Hi All,

I am newbie to ruby,
I have one doubt pertaining to system call and starting my server.
I use the system call --> system("D:\ruby\bin\selenium.cmd")
This starts a server followed by which i would be calling all the
methods in my code.
But until the first part of system call ends, i am not able to go to
successive methods.
I cant stop the server and then start calling other methods since all
methods require server to be up & running.
My question is , Can i start the server and keep it active plus it comes
out of the system call and start executing other methods respectively.

Let me know if you require any more information on this issue.

Ruby's threads are green threads and hence are blocked during blocking
system calls.

Try using 'cmd /c "start D:\\ruby\\bin\\selenium.cmd"'

Cheers

robert
 
I

Idealone Ideally

Robert said:
Ruby's threads are green threads and hence are blocked during blocking
system calls.

Try using 'cmd /c "start D:\\ruby\\bin\\selenium.cmd"'

Cheers

robert

********************************************************************************
I have tried to elaborate on what i was looking for : hope this is clear

Snippet of my code(ruby):

system("D:\ruby\bin\selenium.cmd") --> This opens a batch file which
runs selenium SERVER on which i need to run the below given methods!

#Creating an Object to call Methods --> Here I am creating an object
from which i intend calling methods which exists another class file
masterload = MasterLoad.new()


# Start cvis on the given URL --> Method 1 ..calling the
webapplication
selenium = masterload.cvis_start(url)


# Log into Cvis --> Method 2 ..logging into the web
application
masterload.cvis_login(userid, password)


#Select a Client --> Method 3.. I have multiple methods
like this
masterload.cvis_selectClient(clientName)

Question1 : All the methods mentioned requires selenium
server(system("D:\ruby\bin\selenium.cmd")) to be running, selenium
server invokes an browser on which these methods are executed.
Problem i am facing is once selenium server starts, how does it
go to Method1...as far as my little knowledge is concern until it comes
out of the system method, it doesnt go to the second method.
What i am looking for is I want to start selenium server plus
run all the methods.

Cheers
 
R

Robert Klemme

2008/2/5 said:
********************************************************************************
I have tried to elaborate on what i was looking for : hope this is clear

Snippet of my code(ruby):

system("D:\ruby\bin\selenium.cmd") --> This opens a batch file which
runs selenium SERVER on which i need to run the below given methods!

#Creating an Object to call Methods --> Here I am creating an object
from which i intend calling methods which exists another class file
masterload = MasterLoad.new()


# Start cvis on the given URL --> Method 1 ..calling the
webapplication
selenium = masterload.cvis_start(url)


# Log into Cvis --> Method 2 ..logging into the web
application
masterload.cvis_login(userid, password)


#Select a Client --> Method 3.. I have multiple methods
like this
masterload.cvis_selectClient(clientName)

Question1 : All the methods mentioned requires selenium
server(system("D:\ruby\bin\selenium.cmd")) to be running, selenium
server invokes an browser on which these methods are executed.
Problem i am facing is once selenium server starts, how does it
go to Method1...as far as my little knowledge is concern until it comes
out of the system method, it doesnt go to the second method.
What i am looking for is I want to start selenium server plus
run all the methods.

I have no idea what a selenium server is nor how one "invokes methods
on a browser". I am afraid, you will have to disclose more detail of
the architecture of your app and what you intend to do.

Kind regards

robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top