How to validate photo capture screen is open in Xamarin UITest? - xamarin

I want to write unit test in Xamarin UITest to validate whether photo capture screen is open or not, for both Android and iOS. If anyone know this, can you please give me advice on that?
Thank you

You should write your test queries to navigate to the photo capture screen and call
app.Repl ();
Repl will pause the test and open up terminal window. There you can type any test queries you like.
If you type in tree in the terminal window, you will see view hierarchy of your current screen. And you should look for some elements that are unique to that screen.
For example I use UIImagePickerController to let users shoot an image in my iOS app. It has a button with the label Take Picture, so you could call standard
app.WaitForElement(c=>c.Marked("Take Picture"));
to wait for that button to appear. If it appears then photo capture screen is open. You can, of course, wait for any other element on that screen.
You can even do
app.Tap(c=>c.Marked("Take Picture"));
to tap that button and actually take a picture.

Related

How to create whole screen overlay in MacOS with Swift?

There's an app called Intermission that creates a whole screen overlay:
I tried creating a floating panel which utilizes NSPanel (adapted from https://cindori.com/developer/floating-panel), but it is unable to expand beyond the toolbar/app bar.
I know I can create a new window in full screen mode and achieve a similar result, however I want to draw this overlay directly on top of the screen without entering full screen mode. How can I achieve this result in the way the Intermission app does it?
I figured it out! The trick is to set NSWindow.Level to .popUpMenu. This allows it to appear above the menubar and dock.

Xamarin Android MvvmCross Onboarding

so I'm developing an app that uses MvxSplashScreenActivity for its splash screen and it works well. I just got a feature request for onboarding screens to be shown to first time users. Here comes the problem, I can't seem to find a place to hook in code like if new user then do onboarding else show the splash screen. Is this possible or am I not thinking about it correctly. I will be using this AppIntro for the onboarding slides. Any assistance will be appreciated
I like to funnel users through another activity that has the same layout as the splash screen, which allows you to do any other initialisation and decide where the user should go. This means that you show every user the splash screen and every user the 'loading' screen, but where they go next depends on whether they are a new user or not. The user won't be able to tell the difference between the splash screen and your loading screen unless you want them too so it appears seamless. So it will look like:
Splash -> Main Loading Screen -> if new user Onboarding else the first screen of your app
If you are making any calls to an API or doing anything else that could take a while here it is wise to show an activity indicator also, so the user knows something is happening and the app isn't frozen.
I implemented Jason's suggestion. Basically, always show the splash screen and based on whether it's a new user or not show the onboarding screen or home screen.

How can I omit capturing of a button/region using DirectShow APIs?

I am using "Push Source Desktop" filter for capturing screen in my application.
I hide my application while recording is going on. Only a button for stopping the recording is visible on screen.
The button also gets recorded by the filter. During playback of the saved recording the button is visible along with rest of the screen region.
Is there any way I can prevent the button from getting recorded ?
My aim is to record the screen without the button. I cannot hide the button as it required for stopping the recording of my application.
I have tried to alter the alpha component of my button and make it semi-transparent. But still the filter captures the semi-transparent button.
How can I get the background region of the button and ignore the capturing of the button itself?
The problem has actually nothing to do with DirectShow. Long story short, DirectShow starts when you send the image you already have using DirectShow API and form factor of your software item.
Your question is how to display something on the desktop and grab from the same desktop excluding the part you present to user. I don't think you can implement it accurately without going in too many details, but quite so often you can do a trick like this: you know the position of your UI element so you can identify what's below it in terms of window Z-order (another application window or desktop etc). You can ask this window to repaint into your DC, and then combine the parts into the video you send downstream as a DirectShow source.

Animate View on Menu Button Tap using Swift 2

I got a Home Page in my App which has a Menu button(Hamburger) on the Right of the Screen. My Requirement is to Animate the Current View(Home Screen or Profile Screen or Settings Screen ) on Tapping the Menu Button. On Tapping The Menu Button which Screen is Currently Active Should Animate.
The Requirement Screen Looks like the Image Below
The Image shows how the Screen looks like after tapping the Menu button.
ie: if Home Screen is active then the home screen should animate , if it is a profile screen which is active then the profile screen should animate. Can i make animations like this using Swift2. Currently i am using Xcode 7. For menu i am looking forward to use SWRealViewController. if i use SWrealViewController can i achieve this effect ? Or is there any third party Tool available ?
After a long Search for what i needed i just came to find a library. ITRAirSideMenu
Which is exactly what i was in search for.
You can try this Third party Library. Hope it helps you
https://github.com/DigitalLeaves/DLHamburguerMenu

Is there a way to take screenshots of an entire ViewController in Interface builder?

I do all my work on a 13" macbook and there are times when I need to send the designer screenshots of the ViewController I'm working on. Usually I have to take multiple screenshots but I was wondering if anyone knows of an app or a way to do it from Xcode.
Would it be an option to send a screenshot from the simulator? You could run your app, navigate to your ViewController and presse Cmd + S to save a screenshot on your desktop. Here it doesn't matter if the simulator is bigger than your screen, the screenshot will always show the whole ViewController.

Resources