Protractor test fails when launch directly on Windows Server 2012 - protractor

I use Protractor 3.0.0 to measure UI performances of a web app.
I need to launch my test suites on a virtual machine running on Windows Server 2012. They run perfectly on my personal computer, but on the VM the tests go crazy:
My tests don't always properly click on dropdown menus (e.g. my debug messages indicate that the click on the logout link in a dropdown menu was successful but nothing happens)
When filling text fields A and B with values "valueA" and "valueB" in a form, the tests sometimes sends "valueAvalueB" in the field B
I tried launching tests with PhantomJS, and I still have the same problem with dropdown menus (I didn't check the values of text fields yet). In addition, the performance measurements seem to be too optimistic.
Does anyone encountered the same problem? I couldn't find anything describing that kind of problem...
I launch my tests directly from the VM (not using remote WebDriver or something).

Ok Link Pham this is what I feared... Headless browsers could fix the issues, but we want to measure times spent displaying items and refreshing them. Headless browsers could give too optimistic results (as I observed with PhantomJS when I gave it a try). I will try with headless Chrome.
I guess I will have a bunch of other questions, but your answer properly covers the scope of this specific question so I will close it. Thank you again .

Related

Executing Capybara commands on debug while using Capybara Webkit?

With Pry (but also with Rubymine), I'm trying to debug a certain point in the code (using binding.pry). After calling Capybara's save_screenshot, I'm unable to execute any Capybara related commands (all commands die on time-out). This works out of a "debug mode" and in other web-drivers like Poltergeist.
I took a couple of hours today trying to debug it. I think I found the problem - or at least a way around it.
Our web site has a couple of links that open content in another browser window. Since the automation is quite ancient, and in that time Selenium didn't have a decent way to switch window-context, what we do is to visit the opened page by URL, and by this keep only a single window open at any given time.
This works, but something strange happens when running this test on "debug mode" (using binding.pry for example). Right before we do any actions on that specific page, we take a screen-shot using Capybara's save_screenshot method. On debug this results a corrupted image, and any following Capybara methods will fail on time-out. Opening this page using the link, and handling the windows context switching with Capybara's handle_window method solves the issue. It's still a mystery why it only happens with Capybara wekit though (as other web-drivers work properly). I'm guessing that perhaps the DOM might be structured differently.

Visual studio online source control breaks debugging

I'm completely new to source/version control and I recently decided to try out the Visual Studio online service (the renamed TFS online service). I ran into a problem and now I'm not sure if I'm doing something wrong or is the VSOnline service faulty.
Problem is as follows:
Completely working Windows phone 8 project. Compiler and debugger working as expected in VS13 ultimate (also in VS12 pro).
However, when I add the project to source control and check it in. Then check it back out it breaks.
Symptoms:
1) XAML markup not recognized. IntelliSense reports error for every single XAML tag, even fundamental tags like Phone:PhoneApplicationPage. These errors can be cleared if I change from debug to release mode, but they re-appear when I launch project next time.
2) Debug target not changeable. In the dialog where you can typically choose between device and different emulator modes there is only one option "start". Impossible to deploy app on actual device. "Start" always launches default emulator (which works fine, no bugs there), but you can't choose which emulator.
3) VS13 crashes when I try to open debug tab in project properties/settings.
4) Attempt to build the solution in VSonline fails.
I realize there is a possibility I'm doing something wrong. Never used source control before, but in my understanding I still should be able to handle the project completely normal after check-out. Restrictions to debugging or deploying to device would seem counter-productive to me.
And also the false errors and VS13 crashing in settings implies there is something broken.
Any opinion, advice or help will be hugely appreciated.
After few days of relentless effort I was able to solve the problem.
As I work from home and my own computer, I'm always logged in with my personal account.
And I was logged in visual studio with my work account which has the MSDN subscription.
This caused account clash and all the odd behavior. Logging out from all browser didn't help, it mysteriously kept my personal account always logged in. And I believe this is caused by Skydrive.
So I set up new user account for my work id, log in using that and all started working perfectly.
Bottom line: If you wish to use visual studio online or log in in VS, make sure you are logged in with same account on the computer.

Want to execute single step in selenium web driver

I am using selenium webdriver to do automation of web application.(I am using eclipse)
In my test, I have written the code to login the page by credential, then click some links and go to a particular page.Now on that page i am filling fields through drop down and all and its not working.
So My question is if i changing my code to work with drop down,then to test this again i need to run test case from starting.Means again it it will login page will load and go through various links and then reach to that page.
So can not directly execute that steps only like we do in selenium IDE???
Again and again executing from starting is really screwing my time...??
Is there any way/shortcut?? Please suggest me.
Thanks
Selenium IDE is in-browser, it's then normal you can run at any step. But if your cookies have expired, you'll have to reauthent. It's not a Selenium problem, it's how websites work.
In your tests, you'll always have to start from scratch if your cases involve athent process, unless you manage to get a fine control over your cookies.
You can always make a quick http call to the website you want to connect to with HTTPClient for example, just to get the cookie back, then use it in webdriver with something like
driver.manage().addCookie(new Cookie("foo", "bar", "www.domain.com", "/", null));
then go to the page you need. Notice that this solution solves the Authent problem only, and does not control the state of the tested web-application (data previously posted, etc...).
At our company, we make an extensive use of selenium, and have a lot of tests relying on it, it's therefore a problem we know something about and we are aware of the frustation it can cause.
We use a pretty different solution to get a productivity boost on tests.
In fact, we're using a Groovy Shell-based solution which allows us to go back and forth while developping the tests and keep our browsers open. Groovy is a JVM scripting language that is really easy for a Java dev (almost all Java code is valid Groovy code) and it's really dynamic.
So you can download groovy, run groovy shell (groovysh is the command), then line by line you can launch and interact with the browser xhile your written code is saved to a buffer. When you've done with your test, export the code and put it in Eclipse. It's faster than restarting every time from scratch. Magic lines for starting with selenium are
groovy.grape.Grape.grab(autoDownload: true, group : 'org.seleniumhq.selenium', module : 'selenium-firefox-driver', version : '2.37.1')
import org.openqa.selenium.*
import org.openqa.selenium.firefox.*
driver = new FirefoxDriver()
driver.get("http://my-website.com")
From this point, the browser window is always open, and you develop right in groovy (or java). It's like a selenium-ide, but in groovy, and can be integrated in your developement workflow (but there is a bit of work to do)
This example works for Firefox (as you've probably guessed ;-)) but you can adapt it as you like. We have from this constructed a bunch of tools to develop our tests quickly and iteratively. We found this to be a great savior.
In the case you described, the tests will always return to step 1, therefore, you need to execute your automation suite from the beginning.
Tip for the future, separate your test cases to shorter ones (as Alexander suggested), so you if you need, you can easily use only the cases that needed and relevant to the module you currently working on.
There is nothing different answer..runs from first step...
And my kind advice is that to use a break point in eclipse at which u r guess of failing...and run the eclipse program in debug mode vth continuously pressing F6 key.
The excecution will be slowed and display will be step by step mode which u can easily trace the exact location at which u r code is breaking...

SSRS report won't load in browser

I am new to SSRS, but have begun migrating our reports to that for my organization. I have 3 reports set up at this time, but have run into a problem. Viewing any of the reports in Report Builder works just fine, but viewing 2 of the 3 in IE (also tried Chrome, Firefox, Opera) is only sporadically successful. Report server is set up on database server, and nothing in the queries being run would tax the system.
I know the security settings are correct, as I can access everything without permissions errors; I know the reports work, as I can freely use them in Report Builder and sometimes from the browser; and I am able to always access one of my three reports through the browser. All have the same security, are in the same folder, and I have gone through the same steps to load each of them. The only difference is that the one that always loads is much simpler than the other two as far as volume of data.
Now, to explain what I actually see when this happens. I set my parameters, and click View Report, and the loading icon pops up for about 1/10th of a second, then disappears. The toolbar does not appear, no data appears, and no error message is present. Every once in a while, it all works perfectly. Most of the time, only 1 of the 3 reports works. I've tried without success to find this issue raised elsewhere -- my apologies if I missed it. Any help on this would be greatly appreciated, thanks in advance.
edit details: SQL Server 2008 R2, on Windows Server 2008 R2, IE9 from a Windows 7 desktop.
If you inspect the SSRS error log it may reveal more of the issue. Sounds like a processing error that was not gracefully handled. Inspect the file \SERVER\\MSRSXX.MSSQLSERVER\Reporting Services\LogFiles and find the current log file to view the exception. Depending on how the client is set up some errors may not show.

Java Applet would load only once (in the first window) in Internet Explorer

I am in a bit of fix here. In my company, we have a local intarnet website which has a menu bar in the form of an applet. Few days ago i remember i downloaded an update (either JRE or Windows , i can't recall) and after that in IE strange behavior is observed w.r.t the menu bar applet loading.
If i open the web page first time, the applet would load. when i open a second IE window or tab, the web page would load but the applet just wouldn't load. No Errors, nothing just white space in stead of menu bar applet. If i refresh multiple time, some time the applet would load by itself. purely random behaviour. When i open the website in google chrome, everything works fine. If i open java console, no errors are displayed i.e. the java is just failing to load at all !!!!
I downgraded IE 8 to IE 7 and IE 6 and uninstalled , reinstalled JRE and tried all combinations but the problem still exists !!
Please advice.
yes i did try clearing cach but the problem persists. i mean its purely random. the first time the applet always loads. after that some times it doesn some times it doesn't. No errors at all. Now even google chrome is crashing when ever i open the website saying Data execution prevention error.
Enable the Java console, and enable all logging for it. THis will allow you to see what is actually going on and may allow you to determine why the applet fails.