Dynamically enabling a graphics driver during run time - api

Is it possible to change the active graphics driver in the middle of execution of a program? Or does it require a reboot or re-login?
If so, what sort of API calls (ChangeDisplaySettings?) would I use to dynamically activate and deactivate the driver. Do I need to install the new driver first and reboot, or can that be done dynamically as well?
Thanks!

I figured out that ChangeDisplaySettings() is exactly what I need to do this with a mirror driver.

Related

Uipath automation using RDP for community edition execution

While implementing solution for Level 3 Advanced Training on a separate machine, connected via RDP, i had to use the default UiPath Academy Recorder in order to upload my solution.
Here is the tricky part, although the automation completed successfully without the Academy Recorder on, while it was activated it failed (at random iterations) to recognize the download pop-up window element using the on-element appear activity. If the Academy Recorder was launched from the main machine the automation was also completed without errors.
Additional actions tried:
Check if element vanished
Check with On element exist instead
Also used wait for active and wait for visible options
Checked options for Interactive and Completed as well
-Is this related to the fact that the Academy Recorder slows down remote machine?
Thank you in advance,
Konstantinos
I'm quite aware this hasn't been answered in 2+ years (so hopefully you've solved it!)
An alternative way is to use the Wait For Download Activity.
This activity will wait for the file to be completely downloaded before moving to the next step (so be aware of any timeouts if a bigger file)
The activity is included with the UiPath.System.Activities

How to set DMM4040 multimeter into remote mode?

I have developed a labview program to set DMM4040 series multimeter into remote mode and it is not working. But when I did the same thing by NI-MAX It works fine.
I don't understand what is the problem with this code.
You would need to show us the code first.
Are you using the instrument driver from the NI IDNet (Instrument Driver Network)?
If not, I strongly suggest you start with the driver, which for your instrument can be found here:
http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=16513

Selenium Grid Headless Parallel

I am using Selenium grid to scrape thousands of pages since all the pages are heavily populated by Javascript.
I found this tutorial which gave me a pretty good idea of how to set up Selenium grid and run script in parallel. However, my situation is a little different.
(1) I only want one type of browser, like Chrome(or Firefox), but I want to run as many as possible.
(2) To make sure this solution scale, I probably will use some Cloud service where the code will be running in Linux environment.
So here is my question:
Do I have to use TestNG/Junit frame work to run the code in parallel? If I run the code in multiple processes, all making requests to the same hub, will the hub coordinate them out of box?
(1) I only want one type of browser, like Chrome(or Firefox), but I
want to run as many as possible.
You should be running not as many possible, but a heuristic number, that just works for you. The reason being is, running like 30 chrome browsers at a time can give you unpredictable results.
(2) To make sure this solution scale, I probably will use some Cloud
service where the code will be running in Linux environment.
You can look at BrowserStack
Do I have to use TestNG/Junit frame work to run the code in parallel?
Thats upto you. As far as your creating the driver in multiple threads your fine. If your using your own FW, then you can create Thread pool and start creating the driver from each thread pool.
If I run the code in multiple processes, all making requests to the
same hub, will the hub coordinate them out of box?
Yes Selenium Hub will be co-ordinating this for you, out of the box. You no need to worry about anything here.

Sandbox within vmware workstation, is it possible?

What I want to be able to do is that, run a vmware machine on workstation, windows xp or 7 for instance. But all the changes I make while I am running the machine e.g. create a file, install something etc, I don't want them to be written to the system/image. Instead it should act like even the image itself is sandboxed, and when I shut down the machine, the image stays the same.
Now, I know about the snapshots functionality, but I basically want to save the time that is expended while reverting an image, on every power down session. Instead it should be such that the changes aren't written to the image/system in the first place (and instead are done in something like memory or a temporary location etc), and thus there is no need to revert when the system is powered off.
Now, is this possible to achieve with just vmware workstation itself? if not than is it possible with some third party tool or something of the sort? if yes then specifically which tool? or if this is possible utilizing any other concepts, say ramdisks etc or anything at all really?
Any help at all is really appreciated!
If I understand your you correctly, defining the VM's disks as nonpersistant should help.

How to run code during the "firstrun" of a Xulrunner Application

I am writing a custom xulrunner-based app and I wish to have some files deployed in the user profile the first time the application is run.
I placed the files in my application's defaults/profile directory but they did not get copied to user's profile during the first run of the application.
Should I write some additional code or this should happen automatically?
The thing that gets copied for sure is the application default preferences.
Is there a "standard" way offered by Firefox or some of the many mozilla applications?
Any link to some reading will be helpful.
Any hint is valuable.
Thanks in advance.
Unfortunately the standard way of doing first run code is to use the pref system to determine if you have or haven't done something yet. There are a few gotchas though:
Make sure this code only runs once. If your firstrun code is in an overlay or main browser window, it can be run multiple times (once per window)
after you run the code and set the pref, make sure you flush the prefs, since prefs are written on close and will only be saved when you close.
Components.classes['#mozilla.org/preferences-service;1']
.getService(Components.interfaces.nsIPrefService)
.savePrefFile(null);
You could also use the preferences system in concert with querying for an extensions version number. When the version changes, call your function. That would allow you the flexibility to call the function again later if you want - but only at a version change.