RobotFramework: how to open testautomation on a specific PC screen? - robotframework

I'm using RobotFramework.
I use 'Browser' library and 'SeleniumLibrary' library.
I have 3 computer screens, let's call them 1 , 2 and 3
Now I'd like to open the testautomation on Screen #2
How can I do that?

Feature like this depends on the operating system and its specific desktop environment - nothing to do with robotframework itself or anything RF could solve.

not entirly true,
stackoverflow.com/questions/66569867/how-to-choose-which-monitor-robot-framework-will-display-test-execution
then at the bottom it says python file
and from a python file a library can be made
almost there. but yes more convenient would be an inbuild argument to use for it.

Related

AviSynth can't open my AVI file: “AVISource: Couldn't locate a decompressor for fourcc dvds”

I simply want to open an AVI file with AviSynth and feed it into VirtualDub. However, when I open my .avs script (consisting of just one AviSource() call), I get the following error:
Avisynth open failure:
AVISource: Couldn't locate a decompressor for fourcc dvds
(H:\Videos\QTGMC\test.avs, line 1)
The required dvsd codec seems to be installed, according to software called GSpot (which identifies a video file's required codec's). Does anyone know why I can't open this file and how to fix it?
In case anyone has the same issue in the future, I solved it by installing Cedocida codec: http://www.cithraidt.de/cedocida/index.html#download.
Using DirectShowSource() instead of AviSource() also works.
You can use FmpegSource2() - it does not use codecs from the system like AVISource() or DirectShowSource() and recognizes a lot of modern format with frame accuracy.
Basically, it supports all the formats FFMPEG does.

Where is convert in ImageMagick?

I just spent an infuriating day trying to make a gif out of a series of jpg files in R. I installed ImageMagick to run the following code:
system("convert -delay 40 *.png example_4.gif")
but I get the following error message:
Warning message:
running command 'convert -delay 40 *.png example_4.gif' had status 4
which looks like a path error. Now I've looked for convert in the Imagemagick download and can't see it anywhere. Does anyone know where it is?
Alternately, is there another easier method of making a gif from a series of jpegs in R that isn't ridiculously long?
Thanks
Three options:
Consider using the magick R package instead of using system().
Change your script from convert ... to magick convert ....
Re-install imagemagick, and enable the "Install legacy utilities (e.g. convert)" option.
This change has been around since 7.0.1 (now up to 7.0.7), and is discussed in their porting guide, specifically in the section entitled "Command Changes".
Philosophically, I prefer to not install the legacy utilities, mostly because it can cause some confusion with command names. For instance, the non-ImageMagick convert.exe in windows tries to convert a filesystem ... probably not what you want to accidentally trigger (there is a very low chance that you could get the arguments right to actually make a change, but it's still not 0). The order of directories in your PATH will dictate which you are calling.
EDITs:
From comments, it seems like the difference between "static" and "dll" installers might disable the option to install legacy utilities such as convert.exe. So you can either switch to the "dll" to get the legacy option, or you are restricted to options 1 (magick R package) and 2 ("magick convert ...").
From further comments (thanks to fmw42 and MarkSetchell), it is clear that the old convert.exe and the current legacy mode of magick.exe convert are not the same as the currently recommended magick.exe (without "convert"); the first two are legacy and compatibility modes, but they do not accept all arguments currently supported by magick-alone. So the use of "convert" anywhere in the command should indicate use of v6, not the current v7. This answer is then merely a patch for continued use of the v6 mechanisms; one could argue a better solution would be to use magick.exe's v7 interface, completely removing the "convert" legacy mode.

R2PPT crashes R; are there alternatives to R2PPT?

I am attempting to automate the insertion of JPEG images into Powerpoint. I have a macro done for that already, except using R would be infinitely better for my purposes.
The package R2PPT should do this, I understand. However, I cannot use it. For example, when I try to use PPT.Open, I understand I can do it two different ways by calling method = "rcom" or method = "RDCOMClient". Using the latter, R will always crash, sending an error report to windows. Using the former, it tells me I need to install statconnDCOM , before giving the error:
Error in PPT.Open(x) : attempt to apply non-function.
I cannot install statconnDCOM freely, as I wouldn't call this work non-commercial. So if there isn't a way to get around this issue, are there at least some free alternatives to R2PPT so that I can save several hours of manual work with a simple R code? If there is a way for me to use R2PPT, that would be ideal.
Thanks!
Edit:
I'm using R version 2.15 and downloaded the most recent version of R2PPT. Powerpoint is 2007.
Do you have administrative privileges on this machine?
There is an issue with package RDCOMClient. It needs permissions to write file rdcom.err in the root of drive C:. If you don't have privileges to write to c:, there is a rather cumbersome workaround:
Close R
Create "c:\temp" folder if it doesn't exist.
Locate on your hard drive file rdcomclient.dll. It usually placed in \R\library\RDCOMClient\libs\i386\ and in \R\library\RDCOMClient\libs\x64\ (you need to patch file which corresponds your Windows version - 32 bit or 64 bit). It's recommended to make backup copy of this files before patching.
Open rdcomclient.dll in text editor (Notepad++, for example -http://notepad-plus-plus.org/)
Find in file string c:\rdcom.err - it occurs only once.
Go into overwrite mode (usually by pressing "Ins" key). It is very important that new path will have the same number of characters as original one. Type C:\temp\e.rr instead of c:\rdcom.err
Save the file.
Now all should work fine.
Arguably not an answer, but have you looked at using Sweave/knitr to render your presentations in LaTeX using something like Beamer? (As discussed on slide 17 here.)
Wouldn't help any with getting JPGs into a PowerPoint, but would certainly make putting R-output (numerical or graphical) into a presentation much easier!
Edit: if you want to use knitr (which I recommend), here's another reference.

Set up default sound player

By using R packages like tuneR and seewave I generated sounds that I want to play with some software that is not Windows Media Player but I don't know how to set this up. This command
setWavPlayer("mplay32")
Is the only thing that works (and its WMP). When I try something like this
setWavPlayer("C:/Program Files/foobar2000/foobar2000.exe")
The synth or play command just gives this error when I try to playback my sound
'C:/Program' is not recognized as an internal or external command, operable program or batch file.
Any hints?
Here's what works for me under OSX: assuming I've installed an app called 'play.app' ,
setWavPlayer('/applications/play')
In your case it would appear that somewhere along the line your path string's space (in "Program[space]Files" ) is causing the string to be split up. That error message is pretty clearly coming from a CommandPrompt or similar shell. You need to quote the string using shQuote so that the space is handled properly:
setWavPlayer(shQuote("C:/Program Files/foobar2000/foobar2000.exe"))
If you want to do it in windows this is what I did. Unfortunately wmplayer does not work perfectly. Nonetheless you can play sounds with it.
setWavPlayer('"C:/Program Files/Windows Media Player/wmplayer.exe"')

How does one compile single file Xcode 4?

While I used to compile a single source file with Cmd+K in prior versions of Xcode, how does one do the same in Xcode 4? (Note that this is different than preprocessing or showing the disassembly of the file.) If compiling from a command line is proposed then it must be such that the project's settings, include paths, preprocessor definitions, etc., are all included.
An example use case is where I make a header file change but only want to test the change's effect with respect to a single source file, not all of the files that depend upon that header.
The command has been moved to the Perform Action submenu. Look under
Product > Perform Action > Compile filename.cpp
To assign Cmd+K to it, go to
File > Preferences > Key Bindings > Product Menu group
and you'll find Compile File where you can assign a key. Cmd+K is assigned to Clear Console now by default, so be sure to remove that binding to avoid conflicts.
One way that I have found to do this is to using the following menu commands:
Product -> Generate Output -> Generate Preprocessed File
Product -> Generate Output -> Generate Assembly File
This may not be exactly what you want, but it will compile the single file.
When you build a project, xcode runs compilation command. You can check the log, search for your file and copy paste that command on Terminal. It'll compile only the file for which you copy/pasted on the terminal.
If your file is C (or C++) file, then simply open your terminal, go to the folder in which the file resides and type
gcc -o outputFile inputFile.c
I am not familar with Objective-c that much, but GCC might work since it's only a superset of C, just like C++.
Hope that was helpful :)
The keyboard shortcut Cmd+K on Xcode 3 and before has been remapped to Cmd+B on Xcode 4
Along the same lines, Cmd+Return was remapped to Cmd+R (in case you ever used that)
The common requirement for single file compilation is checking it for syntax errors. (atleast for me). Since xcode4 highlights syntax errors as you type. It seems apple removed that feature.

Resources