Are you asking to start a new MS Windows program, such as Putty from another Putty session. There is/was a link (either in the FAQs or Wish list) on the Putty website about this feature, and a reason why they would not implement it, and a workaround if you still wanted to do it.
Alternatively http://april.se has a program called Anita, that will do what you want, by simply echoing a VT escape sequence back to the session.
The following code, opens a pdf file using whatever program is set on the Windows client machine to handle that file type.
In English: C:>explorer \\cpu\view\logname\document.pdf,
The purpose of this is to allow a person running a simple unix text application to view the associated document.
To all experts, I need some advice on how I can enter a unix command which is equivalent to the action of minimizing/maximizing an active xterm window. How can I do this (i) when control is in the active xterm window to be minimized/maximized , & (ii) when control is in a xterm window which runs... (0 Replies)
Can 'spawn' script be used more than once in a given expect script ??
What I'm trying to do is, first log-into a remote server through one 'ssh' spawn com and then from there log-into another server using a secod 'ssh' spawn command. But this approach is not working... the second ssh attempt... (1 Reply)
Hi
I need a unix script that can spawn 100 unix PIDs that each execute
the lgtst command as <Sid>adm within milliseconds.
Thanks in advance
Rgd
Ruud van Ruler (4 Replies)
Hi,
I have three files in my IN directory.Each file should be copied 25 times using for loop.Each file processing should run in parallel?How to spawn multiple processes in unix?Any help would be appreciated.
Thanks,
Liyakath (7 Replies)
Hi all,
I have a script that runs sftp with expect so I can login and send a file in a cronjob. I've installed this on a couple other servers and it has been fine. However, this time on this machine, it seems to be giving me an issue. It won't move past the spawn sftp command and return a... (3 Replies)
Dear All,
Can someone help to command or program to transfer the file from windows to Unix server and from one unix server to another Unix server in secure way.
I would request no samba client. (4 Replies)
Hi all,
I want to run the following command from my main prompt :
# spawn bash
but I get the following error:
spawn: Command not found.
For this to work , I first have to go into expect.
#expect
expect1.1>spawn bash
spawn bash
564
expect1.2>
Is there any way I can skip the... (2 Replies)
Hi,
I am writing a script to automate installation of java in shell script.
#!/bin/sh
#!/usr/bin/expect
ls -la | grep jdk* | rpm -ivh ./jdk*.rpm
alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_71/bin/java 2
spawn alternatives --config java
expect "Enter to keep the current... (5 Replies)
spawn ssh oracle@$myserver $mycommand
match_max 100000
expect "*?assword:*"
send "$v_password\r"
send "\r"
expect eof
I run this code above and got the error.
spawn: fatal: do not run this command by hand
Thanks (3 Replies)
Discussion started by: zam
3 Replies
LEARN ABOUT DEBIAN
test::www::declare
Test::WWW::Declare(3pm) User Contributed Perl Documentation Test::WWW::Declare(3pm)NAME
Test::WWW::Declare - declarative testing for your web app
SYNOPSIS
use Test::WWW::Declare tests => 3;
use Your::Web::App::Test;
Your::Web::App::Test->start_server;
session 'testuser' => run {
flow 'log in and out' => check {
flow 'log in' => check {
get 'http://localhost/';
fill form 'login' => {
username => 'testuser',
password => 'drowssap',
};
content should contain 'log out';
};
flow 'log out' => check {
get 'http://localhost/';
click href 'log out';
};
};
};
DESCRIPTION
Often in web apps, tests are very dependent on the state set up by previous tests. If one test fails (e.g. "follow the link to the admin
page") then it's likely there will be many more failures. This module aims to alleviate this problem, as well as provide a nicer interface
to Test::WWW::Mechanize.
The central idea is that of "flow". Each flow is a sequence of commands ("fill in this form") and assertions ("content should contain
'testuser'"). If any of these commands or assertions fail then the flow is aborted. Only that one failure is reported to the test harness
and user. Flows may also contain other flows. If an inner flow fails, then the outer flow fails as well.
FLOWS AND SESSIONS
session NAME => run { CODE }
Sessions are a way of associating a set of flows with a WWW::Mechanize instance. A session is mostly equivalent with a user interacting
with your web app.
Within a session, every command ("get", "click link", etc) is operating on that session's WWW::Mechanize instance. You may have multiple
sessions in one test file. Two sessions with the same name are in fact the same session. This lets you write code like the following,
simplified slightly:
session 'first user' => run {
get "$URL/give?task=1&victim=other";
session 'other user' => run {
get "$URL/tasks";
content should match qr/task 1/;
# this is the same session/mech as the outermost 'first user'
session 'first user' => run {
get "$URL/tasks";
content shouldnt match qr/task 1/;
};
};
};
flow NAME => check { CODE }
A flow encompasses a single test. As described above, each flow is a sequence of commands, assertions, and other flows. If any of the
components of a flow fail, the rest of the flow is aborted and one or more test failures are reported to the test harness.
COMMANDS
get URL
click button
click href
follow_link
fill form NAME => {FIELD1 => VALUE1, FIELD2 => VALUE2}
ASSERTIONS
Every assertion has two parts: a subject and a verb.
SUBJECTS
content
title
url
VERBS
should(nt) (caselessly) match REGEX
should(nt) (caselessly) contain STRING
should(nt) (caselessly) lack STRING
should(nt) (caselessly) equal STRING
SUBCLASSING
One of the goals of this module is to let you subclass it to provide extra features, such as automatically logging in a user each time a
session is created.
CAVEATS
If you fail any tests, then the actual number of tests run may be fewer than you have in your file. This is because when a flow fails, it
immediately aborts the rest of its body (which may include other flows). So if you're setting the number of tests based on how many ran,
make sure that all tests passed.
BUGS
Hopefully few. We'd like to know about any of them. Please report them to "bug-test-www-declare@rt.cpan.org".
SEE ALSO
Test::WWW::Mechanize, Jifty.
MAINTAINER
Shawn M Moore "<sartak@bestpractical.com>"
ORIGINAL AUTHOR
Jesse Vincent "<jesse@bestpractical.com>"
COPYRIGHT
Copyright 2007-2008 Best Practical Solutions, LLC
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2008-10-12 Test::WWW::Declare(3pm)