Automation of UI using shellscript


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Automation of UI using shellscript
# 1  
Old 12-12-2011
Automation of UI using shellscript

Hi,

I want to do automation on UI using shellscript.

eg:

1) Drop down menu contains assign , investigate, closed.
now there is one id want assign it using assign tab then need to investigate it and lastly close. Sometimes the id can't assign to perticular user.

there are so many ids ..so want automate this using shellscript .

may be by passing id to script.


Is it possible?


Thanks
# 2  
Old 12-12-2011
There are many ways in shell...

Ex:
Code:
cat id_file
id1
id2
id3

cat sample.sh
while read line
do
       echo $line
done

cat id_file | ./sample.sh
or

./sample.sh < id_file
or

./sample.sh <<EOF
id1
id2
id3
EOF

it always depends on how u use it... Smilie
# 3  
Old 12-12-2011
Thanks for the help siva, will try to implement this code



I have tried one more perl code .getting this code from google(made some minor changes , which is just initilization ) . I dont know the exact output of this code but when i run the below code getting below output.


code:

Code:
#! /usr/bin/perl -w
use HTTP::WebTest;
my $webtest = new HTTP::WebTest;
$webtest->run_tests(
  [       {
           test_name = Login page
           url = Login
           text_require = ( Login
                         Username:
                         Password:)

          },
          {
          test_name = Submit wrong username & password
        url = Login
        params = ( user => unknownUser
                   pass => somePassword )
        text_require = ( Error
                         Your username or password is incorrect )
          }
        {
        test_name = Submit correct username & password
        url = Login
        params = ( user => guest
                   pass => guest )
        regex_require = ( Signed in as.*?guest.*?\. )
        }
]);


output:


Code:
Can't locate HTTP/WebTest.pm in @INC (@INC contains: /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at ./ui.pl line 3.
BEGIN failed--compilation aborted at ./ui.pl line 3.



plz help me for getting the output.
# 4  
Old 12-12-2011
HTTP::Webtest module is not installed. Please install this module on your system. Search for it on The Comprehensive Perl Archive Network - www.cpan.org.
# 5  
Old 12-12-2011
hi balajesuri,

for installing this Webtest module, is it necessary to have root access.???

Last edited by aish11; 12-12-2011 at 08:18 AM..
# 6  
Old 12-12-2011
No you don't need root. Check this: How To Install Perl Modules Manually and Using CPAN command (link removed)
# 7  
Old 12-12-2011
Thanks :-)
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Telnet shellscript

cat << EOF | telnet alt1.aspmx.l.google.com 25 HELO verify-email.org MAIL FROM: <check@verify-email.org> RCPT TO: <test@gmail.com> quit EOF Hello, I'm trying to get the result of that execution, and can not see the result or bring it to a txt ... the direct command in ssh running the result... (5 Replies)
Discussion started by: c0i0t3
5 Replies

2. Shell Programming and Scripting

awk in shellscript

Dear Members, I have the following situation I do not understand: I have a large json encoded file which I need to grep and afterwards want to extract specific information. I use this command to to that: cat /tmp/file | awk -F '"fields":' '{print $2}' | awk -F '"description":' '{print $4}'... (6 Replies)
Discussion started by: crumble
6 Replies

3. Shell Programming and Scripting

Help with shellscript

I am new in shell script i want to convert .txt file in the format axsjdijdjjdk to a x s j d i j d j j d k (5 Replies)
Discussion started by: sreejithalokkan
5 Replies

4. UNIX for Dummies Questions & Answers

How can I do aliasing in shellscript?

#Example.sh alias rmv 'sh Example2.sh' when i execute exapme.sh alias name not working. how i solve this problem?? (9 Replies)
Discussion started by: arun508.gatike
9 Replies

5. Shell Programming and Scripting

if condition in shellscript

Hi All, I tried below code getting error. AD=0 ZERO=0 if then echo "AD is zero select another symbol" fi syntax error near unexpected token `fi' plz help me to solve this error (4 Replies)
Discussion started by: aish11
4 Replies

6. Shell Programming and Scripting

Need help with shellscript

Hello. I am a novince at writing shell scripts but here is the question. I have to write a shell script that does the following: Once executed via crontab, the script should do the following: a. get date/time stamp in for format 10-MAR-05 and b. execute shell script my_script.sh (which... (2 Replies)
Discussion started by: jigarlakhani
2 Replies

7. UNIX for Advanced & Expert Users

shellscript problem

hI, Pls consider the following shell script #!/bin/csh -f sqlplus tkyte/tkyte <<"EOF" > tmp.csh set serveroutput on declare a number:=5; begin dbms_output.put_line( 'a:='||a ); end; / spool off "EOF" The above script does the followin 1)it connects... (1 Reply)
Discussion started by: ravi raj kumar
1 Replies

8. Programming

Shellscript for MQSeries

Iam new to shellscript. 1)How to strart QUERYMANAGER using shellscript. 2)How to put and get messages in MQSeries using shellscripts. 3)iam using local queues . Thanks lot. (0 Replies)
Discussion started by: ram2s2001
0 Replies

9. Shell Programming and Scripting

Another shellscript question

Folks; on a unix server I have a mapping file which holds a list mountpoints of all databases and their mountpoints. tab delimited or colon deliminted..I needed to copy the datafiles from the pristine mountpoints to test's mountpoints in this case. I needed to do this by passing sid name using... (18 Replies)
Discussion started by: jigarlakhani
18 Replies
Login or Register to Ask a Question