WebKit Implementation with c# - webkit

I implemented webKit into a c# app i'm using and it works great except for one problem. Let me give a background of what i'm using it for.
This is a program i've been building that will run multiple tests on multiple customer accounts, it loads each test into it's own dynamically created browser controls and such. However the issue i'm having is that some of the tests use Iframes which pass information in between the parent and child pages. These Iframes run a few ajax commands that show that they are loading, however it doesn't finish executing whatever scripts it needs to run. Is there something i need to change in the way I've added WebKit to my application or anyone else that has had any similar problems? These tests work in chrome and safari as well so i know webkit can do it, but for some reason it's not doing it for me.
Thanks for the help!

Related

XCUITest - resetAuthorizationStatus(for:) not working

I'm trying to use the pretty new resetAuthorizationStatus(for:) method in order to test multiple test cases related the different authorizations (BlueTooth, reminders and location primarily) during UI Tests. But, after using the function, the iOS alert dialog doesn't appear anymore. Does it work for you ?
Thanks

Capybara Selenium Navigate To URL Hangs With Popup Alert on Safari

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; }')

HtmlUnitdriver issues with Ajax content, I think

I have been testing an app using Firefox Web Driver but it is really slow comparing with HtmlUnitdriver, so I decided to translate to last one. All works fine but I have problems with some kind of links that loads information async.
In my case it is not problem of "wait" because I do and as i said before, using Firefox driver works very well. But with HtmlUnit doesnt work well.
In my scene I have following code:
Send
Viewing the app on a browser such as Firefox, when I click on that link, the system return me a result. But when I use HtmlUnitdriver, when I do click to the element, the driver goes directly to the href and then I have a bad result.
I don't really know how to do make works with it. I'm really interested on this way because is really fast.

Auto suggest/complete not loading in webdriver browser instances

I'm having a little trouble nailing down what's causing a particular issue. I'm fairly new to automation testing and I'm having a strange problem. The website I'm testing has an auto suggest function which works absolutely fine when checking manually. The problem is when loading a browser using the Selenium webdriver (I've tried firefox, chrome and IE drivers) that the auto suggest is simply not loading.
It's like the part of the page to do with that and a date/time mini popup aren't loading at all so none of them work when running scripts. Has anyone else had this and resolved it? or is it an issue with the web page itself?
Thanks
You may need to fire an event which by default webdriver is not envoking with sendKeys.
Asking you developer how it works in their code, and then extend selenium to replicate this behaviour.
Also, have you tried do sendKeys one character at a time with a small sleep in-between

How to check ready state for Firefox using RFT

I have been working on a web app, and it was designed for Firefox only.
The getProperty(".readyState") always return 4 >> READY even if the page is still loading.
I already tried the following:
- image comparison using Robot (NO LUCK)
- waitForExistence
readyState is an IE property and it seems it is not working properly using Firefox.
any help from the experts are greatly appreciated. Thanks
Try using waitForExistence on some object on the page that signifies that it is ready. That is, rather than waitForExistence on the page itself, waitForExistence on a child object of that page. For example, if a certain link or button is only available when the page is ready, sync on that.
If this is a page with asynchronous requests running in the background, RFT does have functions which allow you to sync on completion of ajax requests. See the RFT online help docs for ajax support.