I am trying to use the Go To Keyword to navigate to a page.
When you navigate to this page there is a browser popup that you need to use to log in.
The problem I am encountering is that this popup blocks Robot Framework from recognizing that the Go To Keyword has been completed. I have steps in my testcase to try to log in using this popup, but they never get executed because it just gets stuck on the Go To Keyword.
One workaround I tried is to put the Go To Keyword in a separate user created keyword with a timeout of 2 seconds, and then run that keyword in the testcase prefaced with the Run Keyword and continue on failure Keyword. But for some reason the popup blocks even this timeout from triggering and it's still stuck until I manually close the popup.
Does anyone know a solution to this?
What this turned out to be was an issue with single-sign-on.
I had logged into the website environment with a fun account, when opening this page information was being retrieved from a different domain.
Usually when you are logged in with your company account this information is used to acces the second domain.
But because my fun account does not exist in that domain this failed and the popup appeared. Because the popup is a Windows element and not a Chrome element Selenium could not handle it.
We talked about a possible solution and the best method seems to be to use the AutoItLibrary and use the RunAs Keyword to start Chrome as a user with the credentials for the second domain.
I did not fully flesh out this method because is has incompatibility issues with the way we want to execute our automatic test suite. But I wanted to put it here for reference for anyone else encountering this problem.
Related
Sidebar element is not visble in headless mode.
My test running fine but when I used chrome:headless mode then the test always fails. Even I use wait option to wait for element but always fails.
I used screenshot option and I found that the whole left side bar is not visible.
I tried with different browser and got same result. This issue is only in browser:headless.
try using maximizewindow before running your tests. If the problem still persists, please send us an example project.
For example I implemented a stage "Activate Application" that works in debug mode perfectly, but fails when I use schedule-mode or when I simply drag and drop the process on a runtime resource.
A second example that fails: I implemented an action called "Navigate to URL". These action sets the URL from the input variable In_URL firstly in the URL bar in browser Google Chrome. Then the URL bar is focused and the enter button is hit in the last stage.
In schedule mode the following error appeared:
ERROR: Internal : Failed to perform step 1 in Navigate Stage 'Click URL Field' on page 'Navigate to URL' - Could not identify process owning the current foreground window
Actually there is only one Google Chrome window, so I don't understand why it says these error message.
These issues are typically due to either Windows being locked, or using RDP to connect to the resources (RDP does not work well with Blue Prism). In both cases, the desktop will not be active, so any active accessibility or region elements will fail.
At the end of my tests Capybara automatically navigates to "about:blank" in order to set up the next test. Sometimes the application I'm testing will throw a popup alert if the user leaves the page (which is expected). I have some code to handle this:
begin
page.driver.browser.navigate.to("about:blank")
page.driver.browser.switch_to.alert.accept
rescue Selenium::WebDriver::Error::NoAlertPresentError
# No alert was present. Don't need to do anything
end
This works fine on Firefox, Chrome, and IE. But for some reason on Safari the navigate command hangs, I assume because of the popup. Anyone know a workaround for this?
There is no simple workaround for this at this time in any version of Selenium language bindings. It is a known issue the Selenium team is not interested in resolving. Fundamentally, it is due to the architecture of Safari and consequently the architecture of the Safari Driver.
The JavaScript of the Safari Driver extension does not know about most of the alerts and popups and dialogs that appear as modal Cocoa layer windows.
It also cannot interact with them.
There is a way but it won't be easy and nobody's done it.
You would need to use Cocoa.
So you would want to use RubyCocoa in this case.
(or PyObjC if you used Python)
You would then possibly also want a sidecar app actually written in Objective-C.
The trick would be to use the AX (Accessibility API) and a separate process to observe if there is an alert as the front window and poke at its labels and buttons' text as visible to the AX APIs.
AX APIs are probably exposed in RubyCocoa via the ScriptingBridge.
However, you would need to add your 'app' to the Security preference pane's list of things allowed to control the computer.
With that, you could detect the window and handle it.
It could be fairly brittle across web sites, but if built well, you could handle expected conditions.
You could try to confirm like this which I believe should work across browsers
# click ok to confirm
page.evaluate_script('window.confirm = function() { return true; }')
im having a huge problem with the login node in the Web Browser. I click "Login" on the top right corner of my layout. It gets me to the login screen. All fine so far. Then im trying to login and as soon as i typed in my login-data and press "Sign in" Its just reloading the login-page. It doesnt take me back to the site i came from, it doesnt log me in, nothing. Im only having this issue in the web browser since it automatically logs you in, in the Notes Client. Thanks in advance.
PS: Sorry for the bad english.
Sincerly,
Brugen
Agree with Paul...
You could try: http://yourserver.com/names.nsf?open&login to check if your login is correct - disregarding any issues with your XPage.
Next, have a look at your server console to see if anything is written there to indicate a problem. If so it is easiest to use something like the XPages Log Reader to investigate the log files on the server. From the link there is a link to the project where you can download the database.
HTH :-)
/John
Sorry if this is assuming too little knowledge, but are you trying the correct username and password? By default Notes Client and web passwords are not synchronised, it's a separate HTTPPassword field in your Person document on the server. After changing, it may take a few minutes to take effect.
Does anybody know how to simulate typing on Chromium? I want to simulate real typing and I successfully used combination of keydown+keypress+keyup on firefox. However, this approach does not work on Chrome. I tried key{down|press|up}native but that does not help, either. Using type command does not work, because it is not simulating the real typing, it is just setting the input element's value. I know there is a bug in Chromium where one is not able to dispatch key events successfully, but I wasn't sure does Selenium works on javascript level, or maybe on window level. Is this an obstacle I can't get over?
Thanks!
I don't know how you are using Selenium but if you are using it through Selenium RC API you can use normal type (which copies the string into the field). After that try using something like fireEvent("yourstringlcoator", "KeyUp"). This has worked for me in a situation when I wanted the keyUP event triggered (this was with jQuery datatables actually).