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

There are many ways in shell...

Ex:

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... :wink:

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:

#! /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:

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.

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.

hi balajesuri,

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

No you don't need root. Check this: How To Install Perl Modules Manually and Using CPAN command (link removed)

Thanks :slight_smile:

Hi balajesuri,

plz find the attachment ,contains the shotscreen of UI. here for each alertid we are applying (only for "assigned" status) to investigate/unassignalert/Add to case/Export to excel/export to pdf using action drop down menu.

so manually it takes time . so i want to pass such a file which contains all the alertids .

logic is same , but i dont know how to use api here . how to collect all the ids from ui (i think i can take it from database not sure to use)

such type of scenario is possible using shellscript or perl script???

also help me to solve this , i dont know how to write shellscript for ui automation ??

if u have any much more idea u can shre here...

Thanks

Ask the dev team, if there're API's available for this task. That would make it so much simpler to implement using Shell/Perl. Automating such tasks using shell/perl would be mammoth of a task, if there aren't API's available. I'd say, it's not advisable to put in so much effort for such a simple task (to allot an action for assigned status). Though I've come across similar UI cases before, I had the luxury of using API's which made my task simpler in shell/perl.

Let's see if any other member has a solution. It would be an opportunity for me to learn too.

Actully Its not only for such a assigned task ((to allot an action for assigned status)..

If this is succesful, i can try implement this code for complete UI :slight_smile: .

and how can i take the help of dev team, u mean my team ??.. i am using this site but not much more familier with all the information?

ca n any one explore this .... because in our group no one has much more idea???

HI All,

Need your help :wall: