i have blackberry application and i try to display html text in a browser
i try
BrowserSession bSession = Browser.getDefaultSession();
bSession.displayPage("http://www.blackberry.com");
this page success but it display page in blackberry browser not in my own browser, and i don't need that
than i try
myBrowserField = new BrowserField();
add(myBrowserField);
myBrowserField.requestContent("http://www.blackberry.com");
this method displays error 104
and i try
BrowserFieldRequest test = new BrowserFieldRequest("http://www.blackberry.com");
BrowserField myBrowserField = new BrowserField();
add(myBrowserField);
myBrowserField.requestContent(test);
the last 2 methods
it gives no error and display empty browser but after 120 seconds it gives connection timeout
Note: i try different url but it didn't solve the problem
any help,
Regarding the BrowserField,
If you are using a simulator, you should enable MDS-CS (Mobile Data System Connection Service) for the BrowserField to work properly (I don't know any other way). If MDS-CS is not enabled, follow this guide "Testing a BlackBerry device application with the BlackBerry Smartphone Simulator" on how to enable it.
If the MDS-CS is enabled, but you are using JRE 7.0.0 (9930 simulator), then the problem is that the MDS-CS version supplied with JRE 7.0.0 is incorrect (the symptom is that the MDS-CS window doesn't show up when you run the simulator). Check my answer for "Blackberry BrowserField error in Simulator" or "Blackberry webview can not connect to internet and/or display a web page" for more details and instructions.
Hope that one of the aforementioned will work for you.
Related
I am using the webview component to render a webpage in my mini program. In the simulator, the component works as expected, however, when I test it on my android app, I get the error shown in the image.
Please check to see if you have whitelisted the URL that you are trying to access in your mini program’s configuration section on your workspace. Please also note that the simulator supports displaying a webpage hosted locally, however, when you want to test on device, you need to host your site online.
This is sudip here, we've implemented branchio in our app and in website. We're facing an issue in ios 10.3, whenever we open link in ios 10.3 it shows error "safari cannot open the page, the address is invalid", and in background we have our banner which says get the app.
if we click on cancel on confirmation in safari during popup "Do you want to open this in app", it starts showing "safari cannot open the page, the address is invalid"
how can we resolve the above issue
Product Category Links Redirection
Settings for used in link settings of branch dashboard
URI Scheme Deep Link Mode : Intelligent,
Enabled Universal & App Links for both iOS & Android,
We've tested in:
Android - Opened links from hangout, working smoothly
IPhone CE , iOS version 10.3.3 : Opened links from hangout, using safari browser, shows error "Safari cannot open the page"
IPhone SE , iOS version 10.3.3 : Opened links from hangout, using safari browser, shows error "Safari cannot open the page"
Link(s) for Testing
https://link.onference.in/ZsSH9R6uAU
First step is please go to settings-> safari -> Clear History and website data and the check the link, if its not working then you need to check the settings in info.plist and Associated Domains
This alerts usually happens for users who do not have the app on their device when we try to use the iOS URI scheme because the universal link for your app fails. To give better assistance, can you please validate if your universal link setting in your iOS app is correct by our validation tool and give us your result? Also, you can find common issues that cause universal links to fail here.
Please do reach out at integrations#branch.io if you have any further questions!
I've been struggling to debug my standalone webapp with safari's web inspector. The web inspector works fine when I go to the url on the iphone's safari like a normal web page. The problem appears when I add the webapp to the homescreen. I'm having a strange bug that causes my app to crash when I start it from the homescreen and I want to see what's happening, but when I try to open the web inspector on the mac it opens for a second and then it closes unexpectedly with no message at all (also the webapp on the iphone closes). Thanks in advance. More info about the devices and versions:
- iPhone 5SE with ios 10.3.2 (14F89)
- Macbook Air with MacOS Sierra 10.12.5
Well it seems that Safari is having a bug regarding the cache when I add the webapp to the homescreen using the same app name I was previously using. I tried deleting the old one on the homescreen and add it again but with a different app name (short name) and it worked (it loaded the latest version of the webapp) and the bug I was trying to get rid of in the first place was finally gone. I'm concerned however about asking the user to add the app again to the homescreen with a different app name to get the latest version. Maybe that's a sign that I should move on to service workers :)
The application I am testing is a web based app. Is it possible to use Appium to test this? On their website it states "Appium is an open source test automation framework for use with native and hybrid mobile apps."
So I am unsure if this will work for my web app as it is not a native app or hybrid app.
Can someone enlighten me?
Thanks!
First of all, you need to know what kind of web application you want to test. According to information from Saucelabs
there are three types of web application:
Native application
Yes, you can test it using Appium which is a popular tool for mobile testing.
Hybrid application (Native + webview)
Yes, you can test it with Appium but with a little trick that you may need to change the context to switch to webview mode. appium.io
Web app (app that is accessible from browser installed on your mobile device, not the one you can download and install)
Yes, and the details are at appium.io too.
Besides, there is actually another type of app: hybrid app, but with customized webview.
I've been struggling with it recently because I have trouble to find and switch to the webview mode.
I have found Appium to be very cumbersome in testing mobile web applications due to the fact that touch actions are not well supported. From a Java standpoint, I have found there to be two main options for talking to Appium: the Selenium RemoteWebDriver and the AppiumDriver from the Appium Java client.
Selenium RemoteWebDriver
Until now I have been able to test our web app on an Android device using the selenium RemoteWebDriver and RemoteTouchScreen. Using Selenium 3.6.0 and Appium 1.6.5, I have tested 4 different methods to click an element:
webDriver.findElement(locator).click();
new Actions(webDriver).moveToElement(findElement(locator)).click().perform();
new RemoteTouchScreen(new RemoteExecuteMethod(webDriver)).singleTap(((Locatable)webDriver.findElement(locator)).getCoordinates());
new TouchActions(webDriver).singleTap(locator);
On Android, the first 3 methods work, but 4 throws a 'not supported' exception. I have opted to use method 1 for clicks/taps and 3 for gestures.
On iOS, methods 1, 2 and 4 throw a 'not yet supported' exception and method 3 does nothing. Since I was not prepared to invest the time to troubleshoot that, we are only testing on Android for now in the hopes that Appium will be improved and iOS will be better supported.
Appium Java client
My experience with the Appium java client (version 5.0.4) was worse still. There doesn't seem to be a comprehensive tutorial on how to do touch actions, only a few code snippets flying around on the interwebs. So my answer to this question is an attempt at creating one.
First instantiate the driver and navigate to a page:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "Samsung Android S8");
capabilities.setCapability("browserName", "Chrome");
capabilities.setCapability("platformName", "Android");
MobileDriver appiumDriver = new AndroidDriver<WebElement>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
appiumDriver.navigate().to("https://duckduckgo.com");
Then perform a touch action:
new TouchAction(appiumDriver).tap(appiumDriver.findElement(By.id("search_form_input_homepage"))).perform();
This results in: org.openqa.selenium.WebDriverException: Method has not yet been implemented
From this forum post I deduced that I have to switch context to be able to do touch actions. Attempt two:
appiumDriver.context("NATIVE_APP");
new TouchAction(appiumDriver).tap(appiumDriver.findElement(By.id("search_form_input_homepage"))).perform();
That works. However, only for the By.id selector. I could not find any other selector that works when in the NATIVE_APP context. And since most elements in our web site lack an id, I need an xpath selector. Attempt three:
appiumDriver.context("NATIVE_APP");
new TouchAction(appiumDriver).tap(appiumDriver.findElement(By.xpath("//*[#id=\"search_form_input_homepage\"]"))).perform();
Which resulted in: org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters.
Other workarounds that I could think of, such as selecting the WebElement in the CHROMIUM context and then carrying over the location to the NATIVE_APP context is not an option since the coordinate systems differ (browser pixels vs screen pixels).
And don't forget to return to the default CHROMIUM context after each touch action. So the complete code of the only working example becomes:
try {
appiumDriver.context("NATIVE_APP");
new TouchAction(appiumDriver).tap(appiumDriver.findElement(By.id("search_form_input_homepage"))).perform();
} finally {
appiumDriver.context("CHROMIUM");
}
At this point my conclusion is that testing mobile web applications with Appium is not quite there yet.
Yes, I'm pretty sure you can, have a look here:
EDIT: outdated link fixed link to appium doc
Also, a related question here
It is possible, here is example how to create instance for safari in Ruby:
capabilities = {
:device => 'iPhone Simulator',
:browserName => 'iOS',
:version => '7.1',
:platform => 'Mac',
:app => 'safari'
}
$mobile_browser = Selenium::WebDriver.for(
:remote,
:desired_capabilities =>capabilities,
:url => "your_server/wd/hub")
before download appium and click launch to start appium server.
If you are talking about Mobile web apps, yes you can use Appium for testing them
Yes, it's possible for Appium to test both native and hybrid Apps.
For Windows machine, download: Appium For Windows.
For MAC machine, download: Appium dmg file.
Windows need:
Just Appium.exe + .apk file(android) + testing device + Android SDK installed.
MAC needs
Appium DMG file + .app/.ipa file + testing device + XCODE (provisioning certificate) + ANT + ios-webkit-proxy-debug.
For Web apps, as they are purely browser-based, Appium works well on them also.
Link for reference:
https://github.com/appium/appium/blob/master/docs/mobile-web.md
So iOS6 is out, horrah. Now, it appears as though Apple have removed the 'Developer Console' that used to exist in Safari. Great, I hear a lot of people say - it was limited.
But, it works on the device - now apparently you have to connect the device to a Mac to get web inspector?
Is this the only way of debugging with console? Is there a way of debugging with windows, safari? Please note, I don't mean just changing user-agent, which you can do on Safari Windows - that doesn't register touch events - just click.
If you don't have Mac OSX you can use this script as console replacement:
https://github.com/robotnic/waterbug
It shows error message, it's possible to log all kind of variables, you have to turn your iPhone or iPad 90° to the right to open the console.
A poor mans debugging console:
try {
var test = document.do.something();
}
catch (exc) {
alert(exc);
}
One can debug on the device by using bookmarklets (especially within Mobile Safari).
Debugging on the device can be very important if an error only appears live on the device but nowhere else. There is a variety of bookmarklets for developer, so choose the tool of your choice (e.g. Firebug Lite), add it to your bookmarks and use it right where you need it.
This may not be the Developer Console, but it is a method to debug much more accurate and job-oriented.
I wrote a blogpost on how to use bookmarklets on my weblog (there is also a list of other common testing tools and further bookmarklets):
http://hofmannsven.com/2013/laboratory/ios-bookmarklets/
UPDATE: Chrome released its Mobile DevTools which will make debugging (within Google Chome Mobile, Android Devices only) much easier. This will not fix the missing DevTools issue within Safari, but it might help to locate errors on a device:
https://developer.chrome.com/devtools/docs/remote-debugging
http://www.html5rocks.com/en/tutorials/developertools/mobile/
UPDATE2: Mozilla released a Firefox add-on to enable web development across browsers and devices: http://youtu.be/kEFbQwB81RE?t=1m58s
Have a look for weinre. It allows you to inspect a page running in Safari from another computer using a Chrome-like web inspector
You can use window.onerror to debug errors without a console. Simply add this code to your HTML document in its own <script> tag before any other Javascript code:
<script type="text/javascript">
window.onerror = function(e){
alert(e);
};
</script>
This will do so that whenever there is an error, the error message will be shown in an alert dialog box, which is visible in iOS Safari. It's important that the above code runs before the error you're trying to debug, and if you're debugging a syntax error, it's also important that it's in a separate <script> tag.
Instead of Safari on Windows you could use an app by Telerik called AppBuilder. I've found the instructions on this blog. You'll need to get an account to use the Telerik Platform though.
This will give you dev tools like the ones in Safari. I've used it on Win7 64 bit with regular web apps and Phonegap apps running on an iPad with iOS 7.1.
Like neno suggested, Telerik AppBuilder is a great applications. I am actually running Windows XP in a virtual machine on Linux only for the purpose of debugging my iPhone. Windows XP because in my case Windows 7 does regognize the iPhone, but iTunes and Telerik AppBuilder don't.
Looks like the built in console is gone. I tried plugging into a Windows 7 and opened Safari and could not locate the developer console. Then I read this article which confirmed it.
If you need to be able to test your site in both orientations then waterbug is not a good option, because it uses up the landscape orientation for its console view.
One decent option is to use Adobe Edge Inspect. You open your site on Chrome and open the app on your device and your device will mirror whatever page you have open on your desktop. Then you can use the Chrome dev tools to debug your content.