Does Selenium quit() affect other instances? - selenium

I know this is a trivial question but no description of the close and quit function answered my question. I want to run 2 python scripts in parallel and close them properly by calling the quit() function. What I donĀ“t understand is: Does quit() close the instance of the second script too ?
Is this a XY Problem? Maybe since this question came up when i noticed that calling close() leaves me with a lot of used ram and dead webdriver/chrome processes. So to put it in other words: how do I exit selenium in a clean way?

It is absolutely clear that quit() method applied on particular driver object will close that particular driver session only.
This can not have any influence on any other driver objects / sessions if you have such anywhere in you system / memory / anywhere in the universe.
Normally we use close() method only if we want to close some open browser tab and probably to continue working on the same driver object / session. In case you want to close the entire session quit() method should be used.

Related

Does Chrome.robot support parallel run

I was working on the Cucumber report then found the parallel option, as of now I am running only #1 thread and using parallel =false in the feature file. As per my understanding, we cant use parallelism with the karate.robot as it needs one activated window with a title. Please correct me if I am wrong?
I think the main challenge is that most of the UI interactions assume that the "active" window is "on top", visible and has focus. If you can figure out a way to use Element.invoke() for everything, maybe - but you will need to experiment.
Personally I feel that the better strategy is to split your test suite across multiple cloud nodes, and maybe virtual-machines or EC2 instances will work, provided you get the RDP stuff sorted out.
Note that Karate has a way to run distributed tests: https://github.com/intuit/karate/wiki/Distributed-Testing - it may need some research though.

Selenium continue without loading page

While I was doing testing in Eclipse, my java program has to wait for the page in Firefox driver to load completely. Is their any way that i can tell my program to continue executing the next step without waiting?
In my professional opinion, you shouldn't do this. You should let Selenium do its duty, and make sure the page is fully loaded before you continue.
One thing to note, is that when you call click() on a WebElement, Selenium doesn't actually wait for the page to load. driver.get() does however.
What you are asking, isn't a very "common practice", so this may or may not work.
Try just setting the pageLoadTimeout "0".
driver.manage().timeouts().pageLoadTimeout(0L, TimeUnit.MILLISECONDS);
(this syntax is of course if you are using Java. you don't have the question marked as a specific language, so take it as it is and convert it to your language of choice)

How to pause, resume and stop a Sikuli program?

Suppose I am running a Sikuli program and I want to pause the program at a particular point and then after sometime I want to resume the program from that point where I paused, without affecting the process. And then I want to stop the process and exit from it. The point where I stopped till that it should be saved. Is it possible in Sikuli? If yes, then how?
Press Alt+Shift+c to kill a running Sikuli script.
No, Sikuli has no built-in capability to manage this for you. However, you can write all of these capabilities into your script or otherwise get them.
Pausing an resuming is most easily done on the Unix command-line, where you can use control-z to suspend a program and fg to resume it. Windows has similar capabilities. Look for "suspend and resume process " to find some ways of doing this (there are many).
Exiting from a program and then being able to re-start the program and have it resume (roughly) where it left off is called "checkpointing". The checkpointing packages I know of are intended for distributed computing and would probably be overkill for what you're doing, but you could take a look at the Wikipedia entry for suggestions. I suspect that implementing it yourself will be the easiest way to go.
For help with either of these topics, I recommend starting a new question specifying the language you're using (Jython or Java) and the operating system (Unix or Windows). The questions and answers to these aren't related to Sikuli.
For pause, you can use wait commands; if you want to resume, you need to have flags that you set at the beginning of the script, and change accordingly to what you want to wait for.
For closing the script; you can use the Type command wherever you want the script to quit; which is the equivalent of pressing CMD-Shift-C when using the IDE
type('c', KeyModifier.CMD + KeyModifier.SHIFT)
Hope this helps

Can you set Flash Builder to kill previous runs when starting a fresh run?

I'd like Flash Builder to kill previous run instances when I run/debug.
It's driving me nuts that I can easily accumulate multiple instances of my project running outdated code if I don't go through and kill them individually each time I run.
Thank you
This is the best answer I was able to find thanks to Lee Burrows:
There is an unbound keybinding called "Terminate and Relaunch" in the general preferences which will terminate the run/debug that is currently connected to the debugger and start a new instance. So if you only use this you can avoid accumulating outdated instances.
Putting this as an answer, but I hope someone can make something that doesn't require a change in flow (still be able to use the debug button), and this will also not kill multiple instances if that somehow still happens.

Deadlock using third party Ingear.Net .dll?

I am using a .dll from Ingeardrivers.com. I realize this question would more appropriately be asked on that site and have posted to there as well but more people on here makes my chances of it getting answered better.
I am a novice programmer and this is my first experience with threading. Basically I have two main loops in my program, and when I run each loop as the 'main thread' by itself - they both work fine individually. The problem is when I am starting two threads and running the main loop inside these threads, at some point in the loop they both are trying to use the Ingear.net dll and when one loop already has created an instance of the class, the second loop just sits on the constructor and doesn't do anything.
Does anyone have any suggestions on how to resolve?
I'd recommend firstly that you check with the vendor to see if the library is thread safe.
But in the mean time you could try creating a single instance of the class and passing it to your two threads/loops as part of the constructor (or setting a property with it).
It'll most likely not work, but you won't know until you try.
The add-on is thread safe -
I was manually disconnecting the controller each time via 'controllername.disconnect()'
For some reason this didn't actually close the connection and I was maxed out on CIP connections. When I removed that, the controller somehow knew to disconnect by itself.
Strange but it works.