Does PageFactory.InitElements support Windows XP - webdriver

Does anyone know if Selenium PageFactory.InitElements supports Windows XP?
In my case, instead of Lazy initialization of WebElement it tries to find element on a page.
As far as I know it should create some kind of a proxy for WebElement and search for WebElement on a page at first call to this WebElement.
The same code works on Windows 7 but not Windows XP. It throws NoSuchElement exception.

I'd surprised if PageFactory doesn't work on XP. I know no reason why it shouldn't. Although, be aware of browser version that is installed on XP. If it is not the same browser/version that you use on Win7, this may be because same element locator doesn't work properly in older browser.
What concerns me more, is that you use PageFactory at all. I compared Page Object with PageFactory, and I struggle to find reasons why people should be bothered by this "cool" thingy.

Related

Getting "ApplicationHost.cs file not found" when trying to start existing project on macOS

ASP.NET newbie here.
Never faced it before, but right now I've faced a critical need to make some adjustments to an existing application. My platform is OS X. I understand that ASP.NET is mostly for windows, but still researched an internet and it looked for me, that it's still possible to run it on my mac.
When I run a project, I get an error:
ApplicationHost.cs file is not found
My Call Stack looks like:
System.Web.Hosting.ApplicationHost.CreateApplicationHost(System.RuntimeType hostType, string virtualDir, string physicalDir)
Mono.WebServer.VPathToHost.CreateHost(Mono.WebServer.ApplicationServer server, Mono.WebServer.XSPWebSource webSource)
Mono.WebServer.XSP.Server.DebugMain(string[] args, bool root, Mono.WebServer.IApplicationHost ext_apphost, bool quiet)
Mono.WebServer.XSP.Server.DebugMain(string[] args)
Mono.WebServer.XSP.Server.Main( Parameters)
I've researched XSP server, but looks like it was removed from homebrew, so I feel myself stucked. Is there any way to run this on Mac without windows virtual machine?
I am ready to provide any additional info you need, but I just don't know what exactly is important to know
Thanks in advance for any kind of help
As I have heard using Mono is not comfortable approach
It seems like there are two solutions
To use Windows to continue development on Windows
To porte project to ASP.NET Core
While working on ASP.NET WebForms (aspx) has it quirks in VS Mac, it can work to some extend. You'll get some unclear error messages like this one.
In my case it was "just" an error in the web.config file (I did put the connection string element incorrectly inside the system.web).
So my advise is: Use VS in Windows if you can, but you can use VS Mac if you don't mind errors like these.
To solve your problem: rewind back what you changed until this error popped up. It may be in your web.config also.

Is it possible to run browsers in headless mode in a windows box?

I'm writing tests using webdriver in Java.
Is there a way to run browsers (ff / ie) in headless mode in a windows box?
I cant use a linux box and HtmlUnitDriver is not helping as our webapp has many ajax controls.
I have started a small project to supply a driver for WebDriver using SimpleBrowser. You may want to check it out: https://github.com/Teun/SimpleBrowser.WebDriver
It's still early days though. I would appreciate help in the form of contributions and testing.
At this point there is no headless version that I am aware of the Firefox or IE. Since Firefox is open source it's possible that you could get the source code for that browser and then remove the UI portion but there are a few problems with it that I can see. First you have to build a custom app to setup your own load testing engine. Second you are locked to one web render, though I think chrome is open source as well but it doesn't play as nicely as Firefox or IE (using the system .dlls vs. a custom executable). Third without a lot of testing I am sure there will be stability issues and potentially other unforseen issues with this option. That being said there is a .net headless browser that's fairly simple and would probably be decent for load testing called simple browser. However it depends on what you are wanting to load. If you just looking for bandwidth and server load then you should be find using multiple instances of the browser. I would be curious to know if using the headless browser in this fashion if you instantiated different WebDriver if it would play nicely. i.e.
WebDriver driver1 = new SimpleBrowser();
WebDriver driver2 = new SimpleBrowser();
.
.
.
.
.
WebDriver driver[n] = new SimpleBrowser();
and then you could run [n] parallel tests. Also of note in the above code SimpleBrowser() doesn't hook directly to the WebDriver interface you would have to Extend the interface to reference that .dll
Start the test program as a Windows service and the browsers will run just fine, even on a machine with no monitors. Technically speaking, they're running in a "session" that is disconnected, but it's essentially what you mean by "headless".
HtmlUnitDriver does support ajax, and can run in both java and c# (if ported via IKVM).
There is, however, no way to run IE and FF in headless mode. I can't tell you how many times I've wished for that...

ASP.NET MVC 3.0 deployed code not working in IE8 in IIS 7.5

I have an ASP.NET MVC 3 app. It is working fine in both IE8 & FF when we run VS2010. I have deployed this code in IIS 7.5. Now, the deployed app is working fine in FF, but not in IE8. I am getting error:
Stop running this script?
A script on this page is causing Internet Explorer to run slowly...
See following screen-shot:
I tested the published code in IIS6, It's working fine in both FF and IE8.
Any help is appreciated.
You are probably using some javascript which is entering a loop of some sort (possibly recursion)
Either comment out one function at a time to see which function is the culprit, or do it in binary-search fashion and comment out half at a time to narrow it down.
Finally, is there something out of the ordinary about your page? If the your javascript (or one of your libraries) was not the culprit, start ripping out chunks of your code to narrow the problem down.
Unfortunately there is not a quick answer to this one...
There are various ways to try to determine what's going on with your JavaScript. Try reloading the browser. You can also try downloading the Ajax profiling bits at
http://archive.msdn.microsoft.com/AjaxView
This can help determine your slow functions. You could also load up the JavaScript debugger and break into the code as well
What nonstandard javascript libraries are you running? Any?
Since your app runs differently seemingly only based on iis version differences compare a session on one to a session on the other using 'Fiddler'

Severe Flex issues

I seem to be having difficulties getting the trace function to output anything to the console in either Eclipse with the Flex Plug-in, Flex Builder, or even FlexBeans (the Netbeans plug-in for Flex). I have removed and then reinstalled the Flash player 10 debugger version for both Firefox and IE, rebooting after uninstalling them and then after re-installing them. I have removed all old versions of Java and updated to the most recent version.
mm.cfg is configured correctly to allow the trace actions to appear in flashlog.txt
I tried removing the Flex Plug-in for eclipse to re-install, and now that I re-installed, I cannot create new Flex projects. I would rather not uninstall Flex Builder for fear that it will also behave strangely.
ANY ideas would be useful. Ideally, I need the plug-in to work, but any way I could get tracing to output to the console (in ANY IDE) would be better than what I have now.
I'm not sure what you mean by "Flash debugger for both Firefox and IE"; are you referring the debugger versions of the Flash Player available here?
http://www.adobe.com/support/flashplayer/downloads.html
If not, you definitely need those installed in order to be able to write trace() output to the IDE console.
I'm almost positive that this is not the issue, but it has confused me on a couple of occasions.
The Debug Application (as opposed to Run Application) keyboard command is different on Mac and PC. I use both and have gotten them mixed up, which results in my Running when I think I am Debugging, which of course leads to know trace outputs in the console.
Most likely not it, but doesn't hurt to mention it (I hope) :)
-- Evan
How are you testing the debugger? Have you tried going somewhere like with lots of ads that generally still have their traces in? Or are you just testing it with your own swfs? Have you installed the projector debug version? How is eclipse / flex configured to launch test swfs? Is it in the browser, or in the stand alone player? Do you have any weird mxmlc settings?
I assume you've followed all these instructions?
http://kb2.adobe.com/cps/193/tn_19323.html
This is actually a combination of issues. The minor issue was that one application was interfering with Flex Builder Plug-in. The major issue had to do with a setting which had gotten changed on the Flash debugger.
If you right-click the running SWF and then click Debugger, you can (essencially) tell the VM where to listen for trace actions. This had been set to another machine on the network, and not my local machine. As soon as that was switched, everything restored itself.

Why does Flex Builder fail to connect the app so often?

Flex Builder often fails to connect to the app that it's supposed to debug. After a minute or so it times-out and says that it couldn't connect. The only way I can get it to stop doing this is by restarting Eclipse.
Very annoying. Anyone know why this is?
I'm using FB 3.1 and Firefox on Win XP.
Many thanks!
This became an issue with Firefox 3, and the general workaround is to start disabling Firefox extensions until it works. I've found that the AdBlock and IETab extensions interfered with Flex debugging; once those were disabled in Firefox's Add-On Manager, things got better.
See this bug report on Adobe's website for much more information.
I think it may be because it's full of bugs. I haven't worked with it on windows but on os x it reeks. You have to restart the whole os to get it back to normal sometimes.

Resources