Selenium not sending spacebars to application - ajax

I am using Selenium IDE 2.8.
I am a tester and using firefox to test a php based application with ajax.
There is a point in the application where three space bars are entered into the textfield and ajax will fetch all data and display a seperate bit of css displaying the information.
Enter 3 spaces in the textfield, information then appears.
For some reason on playback this 'three space bar key press' event isn't called or indeed reaches the texfield....nothing happens, ajax has nothing to do and the info that my selenium script is waiting for doesn't appear and promptly fails.
There is nothing to 'waifFor...' etc.
Any suggestions?
Thank you!

use sendKeys command instead of type

Related

Selenium cannot find elements on Google service while minimalised or headless mode

I try to create a program which will automate fetching data from one of the Google services. By using chrome and watir (which is basically a Ruby library build on top of the Selenium). Everything works fine as long as I keep my browser open. But when I minimize window, my program is not even able to pass a login process since it cannot find certain elements. This is my code to login:
#browser = Watir::Browser.new :chrome, options: { detach: true }
#browser.goto BASE_URL
#browser.text_field(name: 'identifier').set USER_EMAIL
#browser.element(xpath: '//*[#id="identifierNext"]').click
#browser.text_field(xpath: '//input[#type="password"]').set USER_PASSWORD
#browser.element(xpath: '//*[#id="passwordNext"]/div/button/div[2]').click
When my browser is minimize, during attempt to set a password I get this error message:
*** Watir::Exception::UnknownObjectException Exception: element located, but timed out after 30 seconds, waiting for
#<Watir::TextField: located: true; {:xpath=>"//input[#type="password"]", :tag_name=>"input"}> to be
present
And it works just fine as an open window. Even if I maximize the window during whole process program is suddenly able to locate missing input fields. The same story goes in many other points further. Program is not able to locate some elements unless chrome window is open.
Needless to say it works even worse in headless mode and I'm basically not able to locate any of those elements in html code.
As far as I understand Google services frontend side are build with Angular framework which inject html code dynamically. But shouldn't selenium pretend to act like a regular user and trigger the same responses on minimized and open window (and the headless mode as well)?
Is is some kind of blockade from Google to prevent this kind of automated proces and how can I bypass it?
Is this an issue with Chrome and switching for e.g. Firefox would fix it?
Can I implement some additional actions to actually mimic human interaction and pretend that my Chrome window is open?

Script issue in J Meter while recording script using 'BAD BOY' tool

Chrome Settings
HI All - I am new to J meter and i am continuously getting the script error while recording the script using bad boy tool.
I tried with the changing the chrome settings as above:
but still am getting the same script error.
I hope when you normal browse the application then your are not getting the error.
So, if you are recording and getting pop-up but you can proceed further then record your action and suppress the javascript error from Preference>Automatically handle>Javascript Error Dialogs.
You can also disable recording javascript request from Preferences>Recording option. Since, jmeter work on request and response and not GUI level so javascript is not supported. It does not actually parse/execute JavaScript coming with the loaded page.
Also, try the option you have shown to disable script in IE browser and then try with chrome.
Hope this helps.

Chrome.runtime.connect no longer identified?

I have an extension with a background page and a sandbox page where most of the content scripts execute.
Whenever I need to do an Ajax call it has to run in the background environment as otherwise I get a CORS error. Recently as of last week I believe, the chrome.runtime is no longer available in the sandbox environment for some reason. I can't find any notes etc about it and trying to figure out a solution how to communicate with background page now.
I had this in the sandbox environment to initialize a connect port to pass messages from an Ajax request
var ajaxCall = chrome.runtime.connect({name: "ajaxCall"});
Is there any info out there that I'm missing on why this change occurred and what are some possible workarounds?
Here's the output for chrome. 1st is the background page and 2nd is the sandbox. They used to be identical in both.

AJAX not getting invoked through QTP

I am working on QTP 11. I my current project I am trying to automate a website with AJAX fields. I my project I have a text field on which if we try to enter characters then AJAX table appears and we have select a suitable value from the below table. I am able to check the existence of AJAX table.
The problem is to set the text field through QTP, AJAX is not getting invoked. But manually it is working properly. Also, if I first try manually and then I try to enter any through the script, then also it is working properly. It is not possible for me to check each field manually then enter it through script. So can any body tell how AJAX can be invoked on first try without any manual intervention?
I have tried to Set property, Keyboard events like WScript.shell, Mercury.DeviceReplay and AutoIt, however none of them are working. Are there any keyboard input methods that I have missed out?
Can somebody please help me out?
Try performing a WebEdit.Click on the text field in question. If this doesn't work it means that the web page is expecting some events that QTP didn't fire in this case you should change to device replay mode
Setting.WebPackage("ReplayType") = 2
Browser(...).Page(...).WebEdit(...).Click
Setting.WebPackage("ReplayType") = 1
I had the same issue, not recognizing the web list (not selecting the item from list). Using QTP 11.5 loaded with web toolkit 2.0, ASPAjax, DOJO, JQuery add-ins. Still showing the same behavior.
However there is nothing wrong with the code, if I give some wait the code is working OK.

Watin's LogonDialogHandler not working for Firefox 3.6

I'm writing automation scripts for a website using WatiN. when I browse to a particular url, a authentication dialog pops up. I have following code to handle the dialog. This code basically enters the specified
// Create a logon dialog handler
LogonDialogHandler ldh = new LogonDialogHandler(user, password);
browser.DialogWatcher.Add(ldh);
browser.GoTo("URL that pops up the authentication dialog");
Now this works just fine in IE. But in Firefox, the dialog appears and nothing happens after that. (No username or password entered in their text boxes)
Any idea what's going wrong here?
I'm sorry but the automation of firefox popups/dialogs is not supported by WatiN at this moment (WatiN 2.1 and lower). It probably can be done but this is not high on my priority list.

Resources