Mobile used web app automation without Appium? - selenium

Can we use normal selenium web automation to test a mobile web app by changing window size to mobile resolution? or do we need to use an emulator and appium?
Currently, I'm working in a company. I didn't use appium for mobile web app automation. What I did is an automated web app with selenium ,Robot Framework as a normal web application and changed the window size to mobile resolution. Is it right?
sample code for window size set for mobile size is shown below for more understanding...!
open browser https://sample.com chrome
set window size 440 717
Thanks for your help guys!!

I would suggest you to use Appium if it's a mobile-based web application as this is the preferred way of end-to-end testing.
For mobile automation, you don't need to download Android Studio as it is an heavy-weight tool. You can make use of avdmanager.
To create emulators, you can refer https://gist.github.com/mrk-han/66ac1a724456cadf1c93f4218c6060ae

Hi guys, I found a clarification for this according to my question.I'm trying to automate a WebApp for mobile and I'm testing in a mobile chrome browser. So it is easy to find elements with appium.We will not need appium inspector to capture elements as we are automating a mobile web application.Not a Native Android app.
https://appiumpro.com/editions/57-how-to-determine-element-locators-for-mobile-web-and-hybrid-apps
Refer above link and inspect the elements. It's totally the same as we are doing normal web automation. The only difference is using the emulator and appium server to run the test.
It was a kind of major issue for me as a beginner.I think now it's been solved.

Related

Does Microsoft UI Automation Framework work with Chrome, Python and Java Apps?

I am working on an automation project, in which I need to capture the activities [ application launched, data entered, input type etc.] user performs on a desktop. I came across Microsoft UI Automation framework which so far works well for native windows based applications like MS Office, .NET apps etc. However I did not find any useful information / samples of capturing the information from different web browsers [Chrome is a must], Python apps, Java Apps etc. Can someone please confirm whether MS UI Automation Framework supports such apps. Any working example to extract user activities from these apps would be highly appreciated. Thanks.
Chrome only supports UI Automation for toolbars, tabs, menu, buttons around the web page. Everything that's rendered as a web page is not seen by UIA.
For the web page content, the easiest way is to use Selenium (driven by the ChromeDriver), which is kind of a de facto standard for browsers, and has nothing to do with UIA.
To test if an app supports UIA, and how far it does, it's very easy, just run UIA's Inspect tool and check the UI tree over that application.
Some additions to Simon's answer...
Chrome page content can be seen by UIA if you run chrome --force-renderer-accessibility. Only for existing Chrome process it won't work. Though user can create a new tab chrome://accessibility manually and enable UIA for all or some chosen pages. This method also works for AT-SPI accessibility technology on Linux. Of course, Selenium WebDriver is an industry standard here. But another way exists. Both Mozilla and IE support UIA by default.
Inspect.exe can be simply downloaded from this GitHub repo.
Regarding Java apps it depends on the app type. Your chances is about 50/50.
WxPython or PyQt5 are good for UIA. TkInter or Kivy apps are not.
P.S. There is an example how to drag a file from explorer.exe and drop to Google Drive in Chrome using Python library pywinauto.
I'm a bit late to the party..
But Chromes accessibility features are only activated once something tries to access it's accessibility.
If you call AccessibleObjectFromWindow ([DllImport("oleacc.dll")]) with the window handle an existing chrome window will have its accessibility activated (and you'll see the actual web page content in UIA!).
If the chrome window is opened after your app is running - Chrome pings open processes for any open accessibility apps... for that you use AccessibleObjectFromEvent and the event you're responding to comes from the windows pipeline: EVENT_SYSTEM_ALERT = 0x0002 .
The bottom line is - you have to tell chrome that there's something installed that wants to access it's web page content.
Oh! and your application has to be signed!! Unsigned apps won't be able to access web content - I think that's the same in firefox too.
I hope this helps someone in the future.
See:
https://www.chromium.org/developers/design-documents/accessibility

Mobile hybrid app testing using Codedui

I was working on a ionic mobile hybrid app and looking for automation testing tools. I found Codedui a solution for testing windows/web application and I was wondering if this can be used for testing ionic apps as well. I will appreciate if someone who has done similar task can share his views. Many thanks.
Never hear about Codedui before, but I suggest to use Protractor to test automatically your App. Protractor runs tests against your application running in a real browser, interacting with it as a user would.

mobile app testing in watir

I have been trying to locate WATIR/Webdriver gem for automating mobile applications. So far I am successful in finding the resources for Mobile Website testing but could not find Mobile Application automation testing like seeTest (experitest.com) provides. Like for example, i have an iPhone and it has tic-tac-toe app installed on it. I want to automate it through Watir/Webdriver or any other gem available to launch app from iphone and start playing it.
Can we accomplish such use case in watir?
Watir (and Selenium) can automate browsers only (including browsers on mobile devices). If you need to automate native mobile applications, take a look at appium, calabash, Frank or robotium.
As of now, still doesn't look like there's support for watir in Appium. It's good for selenium though, just the drawbacks are that you can't use the page object gem.

How to upload a photo image using Sencha Touch without phonegap

Is it possible to upload an image created by the phone using Sencha Touch but without any dependency on PhoneGap? Basically my app will be accessible via the web, and not installed natively on the device. I want to be able to select an image from the phone storage and then be able to upload it to the service. I effectively want the same functionality as you would get with the file upload control on a normal desktop browser.
Is this possible, and if so how?
There is a current solution in its infancy, but it works. I tested it on my Nexus 7 using Chrome. Here is the list of compatibility:
Android (4.0 up) browser support as regular
Google Chrome for desktop and mobile
iOS Safari browser support from version 6.0 (not tested on mobile)
https://github.com/kostysh/File-uploading-component-for-Sencha-Touch
Desktop webbrowser and mobile browser are different in lot many cases. To access file upload option you need to access the OS API which is not possible using javascript only. Phonegap provides us option to connect js with device API. If you can find a way to do this, without using Phonegap, then may be you can fix, or else its not possible.

Mobile Layout Screenshot Service

Is there a service like Browsercam.com that tests mobile browsers aswell?
I've only found sites like DeviceAnywhere.com, but those test the whole platform, not only the browser
it should at least support Android and iOS, in different resolutions and landscape/portrait mode
of cource, few minutes after the opening of the thread, I find the perfect service.
The only one I could find with mobile testing
http://crossbrowsertesting.com