WWW::Mechanize::Plugin::Display - Always open a new window - perl

How can I configure WWW::Mechanize::Plugin::Display, so that the plug-in always opens a new window and not only a new tab?

The module uses HTML::Display for opening a browser, which in turn uses the environment variable PERL_HTML_DISPLAY_COMMAND for determining the command for opening a browser. So, if you want to use Firefox, for example, you can set that variable to firefox -browser %s to force opening a new window.
http://search.cpan.org/~corion/HTML-Display-0.39/lib/HTML/Display.pm
EDIT:
Sorry, this doesn't seem to work either. It opens a new empty window for each call to $mech->display, but also one tab for each call in which it then displays the content. Maybe you can find other command line options for Firefox or another browser that allows you to get the wanted behavior.
As an alternative you can configure your browser to always open new windows in new windows instead of new tabs (for Firefox: Preferences -> Tabs -> Open new windows in a new tab instead). If you want to keep that setting for your normal browsing, you can create an own profile for your Mechanize tests and add -P <your-test-profile> to your display command.

Related

Read/parse application content

I wanted to see the possibility of getting the text displayed by a certain installed application and running on windows in a certain open window.
Is there a generic way to access the contents of an open window?
Thanks for all your help

Prevent Chrome from closing tab that downloads CSV

I want to find out the URL to a specific CSV file on a web page. The page is built using some arcane system called QLIK, and for some reason, the CSV path does not show up in my networks panels in Chrome when hitting the download button.
When I download the CSV, a new tab is opened. I want to keep that tab open and inspect the developer tools. But Chrome immediately closes it. How do I prevent Chrome from closing the tab?
Chrome doesn't pipe network information on downloads to the network panel. They go through a different pathway then page-pound network operations. You can't inspect binary downloads.

Selecting a file from a windows dialog box in Telerik Web Test

Hi guys,
Is it possible to select a file from a dialog box when we are running a web test in Telerik Test Studio? The scenario of this execution is when we click a field in a web browser, a windows dialog box pops out and we would need to input a path to a local folder and select a file(SelectFile.PNG).
But I'm unable to detect any element from this dialog box presuming this is because the test script is a web test and hence this limitation(do correct me if i'm wrong).
Is there any workaround or suggestion to this limitation?
Many many thanks!
Best Regards,
Pravin
praja#dongenergy.dk
Kind of a late response but if your recording is enabled, it should automatically record the step for a File Upload dialog box (and handle it appropriately when using play back).
Alternatively, you can manually add the "Dialogs->FileUpload" step, and fill in the properties appropriately.

Is there a way to programmatically open a server-side file in a new tab?

I'm running Jupyter notebook on a server and executing it from a client computer. In Rstudio server, one can programmably open a server-side file in a new tab via file.show. This is sometimes very convenient. For example, I have a script that processes a rather large image. Because of its size I don't want it to show directly in the output panel, rather I want to view it in a new tab. In Rstudio server I would normally do:
... image processing code ....
ggsave('temp.png')
file.show('temp.png')
This will automatically pop up the new image in a new tab once the script is finished.
Is it possible to do something similar in Jupyter?
I noticed that I could achieve this by clicking the image file in the built-in file browser, but I wonder if this could be programmed.
Similarly, is it possible to programmably open a webpage in a new tab like browseURL in Rstudio server? Note that webbrowser.open(url) doesn't quite do it because it tries to open a local browser, which in the server-client scenario will not open the new tab on the client side.
You can make a link. Relative URLs will open in a new browser tab. Files are served relative to the directory containing the notebook you are currently working on.
In Python:
from IPython.display import display, HTML
display(HTML('see image'))
Opening new tabs programmatically often triggers pop-up blockers, but publishing a link that the user clicks should be reliable.

jQuery File Upload Using Siebel OUI in IE11 Does Not Work

When I attempt to drag and drop a file onto a Siebel attachment list applet, IE11 is opening the file instead of uploading/creating new record in the applet. I can see the drop zone tag "Copy" when I hover over the applet but when I drop the file it gets opened in the same browser window. Expected result should be that the file is uploaded and added to the applet in Siebel without any prompts.
Figured it out, the browser was running in elevated mode for the dedicated client. The drag and drop does not work for local dedicated client unless you are running IE in non-elevated mode. Also, the new button on our applet was invoking "NewRecord" method instead of "NewFileAttachment" as it does in OOB Siebel account attachment applet. So I changed MethodInvoked for the New button to "NewFileAttachment" and ran the dedicated client in regular mode and drag and drop works beautifully :)