Selenium-webdriver Firefox issue windows 7 - firefox

I am running Selenium Webdriver locally on my windows home server (windows 7 professional actually) which logs to a site and sends some emails. It's a java program with a single thread running.
I can see Firefox opening up just fine when running through Eclipse and follow the clicks etc as it logs on without problems.
I have set up a Task Scheduler task to start it up every morning though and run the jar. The program runs fine but when Firefox opens it is almost invisible, I can see the grey frames of it but everything else is transparent and invisible and if you drag something in front of it the graphics get stuck.
When clicking on Properties on Task manager I can see that it started with firefox.exe - foreground whereas when I open Firefox normally it says -browser.
The program still does what it should do, it's just Firefox is not visible at all when running through java -jar X.jar etc.
Any ideas why?
Windows 7 Professional
WebDriver 2.32
Firefox 21
I suspect it has something to do with the anonymous Firefox Profiles created each time firefox runs. I usually delete them from Temp once a week.
P.S No idea if it matters but server is headless and I am accessing it through TeamViewer.

Issue solved by deleting firefox profiles and loading from scratch. Weird, not sure yet what caused this and if it happens again.
Perhaps I will create a specific firefox profile and use instead of a anonymous one created each time.

Related

Is there a way to trick GUI applications in docker to think their window loaded?

I try to run an windows 10 application inside a windows servercore container.
The app can run without user input via COM-Interface (and without visible GUI), but it seems that it needs to load a hidden window in the background. When I start it on docker, the application log file indicates that it's stuck on starting this window.
Is there a way to make the app assume it successfully loaded the window?
All information I found so far was about users who want to see the GUI or about Linux/Windows combinations. None of that helped me.

After using Selenium on macOS, Chrome isn't the same

I installed selenium and used a python program to run chrome using selenium on my MacBook Air. Before there was an error on selenium, and after installing googlechrome drivers for selenium and creating a PATH using terminal, it opened a separate google chrome page that showed Chrome is being controlled by automated test software.
After around 30 minutes of running python and using selenium, I saved and closed out of everything.
In the next 2 minutes, I reopened Google Chrome to search something about web scraping, and the browser was the same one used by selenium. It still showed the Chrome is being controlled by automated test software notice, and there was a Chrome Automation Extension.
I tried:
logging in and syncing, but syncing was not available.
opening Google Chrome from application folder and dock, but nothing changed
deleting Google Chrome and reinstalling, but nothing changed
I don't know how to fix this. Can anyone help me?
Thanks in advance!
Ok, so I found out that the chromedriver was still running in the background. After I closed it using activity monitor, the problem was solved.

Firefox won't play iMacros via URL?

For the last week or so I've been developing an application to programmatically maintain some stuff online, to do so I need to launch iMacros from Firefox via Python.
Currently I am doing that in Python with this code, it has worked fine for a week:
firefoxpath = '"C:/Program Files (x86)/Mozilla Firefox//firefox.exe"'
macroCommand = firefoxpath + " imacros://run/?m=" + path_to_macro
subprocess.Popen(macroCommand)
There is some other stuff that cleans up processes in there and listens for errors too, but all that really matters right now is launching the macros
Today, after this worked for several hours of coding. I started getting this popup when attempting to launch via Python. (It's the popup Firefox gives when it doesn't know how to handle a file or URL).
Launch Application Popup:
It would seem that Firefox no longer thinks it can launch imacros files directly. However, the files play just find if you click "play" in the iMacros panel.
I've been troubleshooting for an hour and it doesn't seem like anyone online has had this problem before. Any ideas?
UPDATE:
I managed to get this working by completely reinstalling windows on the problem machine. Before doing that, I reinstalled firefox a number of times, tried a portable copy of firefox, deleted firefox's registry entries, disabled multi-process windows in FF, uninstalled all plugins one by one, and tried the same thing as a different user (both with and without admin).
None of that worked, if anyone in the future encounters this bug I recommend just reinstalling windows on the problem machine.
I was using
Windows 10
Firefox 54
iMacros for FF 9.0.3
Python 2.7
God speed to anyone else who encounters this.

Selenium Server on CentOS 6.2 has no keyboard input while testing

We currently have a problem with SeleniumServer which is troubling me for 2 days, now...hope you can help me.
The Selenium Server is running on a CentOS 6.2, Selenium Server is 2.21 and Firefox is 10.0.4.
When a test is starting up, SeleniumServer launches Firefox but he can not type anything in the form fields or press "Enter" to submit.
Even better, no one (not even me with VNC-Server) can write something in the form field, url bar, menus, press a key like "Enter", etc....it is as the keyboard is not present... It´s like Firefox is locked somehow.
If a start Firefox with Interactive-Mode : selenium-server.jar -interactive & cmd=getNewBrowserSession&1=*firefox&2=http://www.google.com everything is working fine, I can do all the tests manually.
I can also start firefox manually with just typing firefox in the shell and that is working fine, too.
So what is going on in Selenium and how does Selenium starts Firefox? Why is no Keyboard-Input available when running a Selenium-Test with SeleniumServer?
We tested with MacOS and Windows, too and both working fine with the same test.
Any idea would be appreciated.
Greetings from Berlin
Fixed it myself with an older version of Firefox. Firefox 7 worked for me.

Is it possible to run 2 firefox instances one in safe mode and one not

I love firebug for helping debug my web apps, as well as seeing how others have implemented there sites. However firebug hinders memory leak testing.
I've just found that FireFox can be launched in safemode which disables all addons, which is great for memory usage testing however once firefix is launched (either samemode or not) all subsequent firefox launches (they all appear in task manager as 1 firefox instance) will use the mode of the first one.
I'd like to leave one in same mode testing some apps for leaks and use another with firebug to develop.
I've tried making a copy of the FireFix.exe and even copying the whole firefox directory but it still launches as one application.
I could always use VirtualBox to create a full virtual PC for this testing but that seams like a large overhead.
Edit
I have just tried the -no-remote switch but it just comes up with "firefox is already running .... you must first close the existing Firefox process.... "
First close all your Firefox instances. With all instances closed, run firefox via the "Run..." dialog on windows, typing "firefox -p". It will open with the profile manager, where you can create multiple profiles with different configurations.
After creating your profiles, just run you "main" browser using "firefox -p" and select your "main" profile. To open another instance using a different profile, run Firefox using "firefox -no-remote -p" and it will prompt the profile manager again, so you can choose a different profile.

Resources