Re: [selenium-users] Can I fill form from CSV file with Selenium?

449 views
Skip to first unread message

Krishnan Mahadevan

unread,
Oct 22, 2012, 1:50:48 AM10/22/12
to seleniu...@googlegroups.com

Answers inline.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


On Mon, Oct 22, 2012 at 3:52 AM, jshrek <je...@forerunnertv.com> wrote:
Hi

Just wondering if Selenimu works on both Mac and Windows?
 
Yes Selenium does work on WINDOWS, Mac and Linux. 

Also, is it possible to do the following with Selenium:
(1) Find a specific link on page and click it, and wait for popup form to open.
Yes this can be done using selenium 
(2) Fill in three different text box from data in CSV file and then click Submit button.
Yes this also can be done using selenium 
(3) Check for errors and if any detected, pause script and wait for human to fix.
I dont think you can instruct selenium to pause, wait for human intervention and then resume, until and unless you are putting in some hard coded sleeps 
(4) Repeat above with each line of data in CSV.

Reading csv file, iterating over its values is NOT an attribute of Selenium, but essentially an attribute of your client bindings [Java/.Net/python] I know only Java, so yes using Java you can read a csv file, and iterate over its values as  well.
 

Thanks

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/8bG08gfT7tYJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Gaurang shah

unread,
Oct 22, 2012, 9:32:44 AM10/22/12
to seleniu...@googlegroups.com
Hi, 
I guess for following rather than sleep or something what you can do is you can execute javascript to show javascript alert box. and then few second pause. 


Check for errors and if any detected, pause script and wait for human to fix.

sirus tula

unread,
Oct 22, 2012, 1:58:16 PM10/22/12
to seleniu...@googlegroups.com
Like krishnan said, Yes it's possible to use excel sheet as database where you have all the test data just like you do with the QTP.
 
Pausing script when error occured is impossible unless you can have a messagebox pop up as soon as the error occurs and then u fix the error yourself and click 'OK' in the messagebox pop up.
 
But i don't think that is good practice since you might have 100's of row of data and it will be very hectic to do manual interaction if errors found. It will be more easier if you do manually instead of doing whole automation.
 
Here's my suggestion and what I've done, keep on running the script from the excel test data either it is failed/passed then after the test is complete,find out the errors and figure out why it failed.
 
Hope that helps!
 

 
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/6aach7u8CpcJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
 
- "If you haven't suffered, you haven't lived your life."
 
Thanks,
 
Sirus

Luke A.

unread,
Mar 27, 2015, 2:01:15 AM3/27/15
to seleniu...@googlegroups.com
Krishnan,

Could I do this exact thing (minus step 3, don't need to pause the script) with Selenium IDE? I'm new to Selenium and while I know Java, I've only have had experience with IDE so far. That and IDE would be easier for my co-workers to understand as well. 

Thanks,

Luke

Krishnan Mahadevan

unread,
Mar 27, 2015, 2:06:50 AM3/27/15
to Selenium Users
Luke,
I must admit, I dont have any experience with Selenium IDE. But I can tell you for sure that it may not be supporting anything which doesnt involve Selenium (reading a file is something that is not related to Selenium).


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages