UI Automation store screenshot in given path - ios-ui-automation

I can see screenshot in log, but I can't store it in given path. How can I store it in given path, e.g.: \users\downloads\test.png
Screenshot is taken using the code below:
target.captureScreenWithName( "screenshot1.png" );

In the Instruments window, in the left sidebar, there is the Logging section on the very bottom. You can save all your log results (logs, screenshots etc.) in desired folder by pressing Export Traced Results… button.
Also, you can check Continuously Log Results checkmark and specify required folder. All log results will be saved in that folder automatically.

Related

How to load images via file open dialog in TestCafe

Background info:
Our application depends on different sets of medical images (due to the medical environment we can't share our code). In each image, a set of test cases is run. Each time we need to manually select a new image, which of course we want to automate. The loading of images is fairly complex, but our devs created a button that covers all that. This button opens a File open dialog.
My Question:
How can I open a file dialog window and import new images with TestCafe?
We've tried:
t.setFilesToUpload (which not seems to work because it needs a selector where the images get uploaded to?)
List item clicking the button (it does not open the dialog
window)

Get path to file (e.g. picture) in android device (e.g. cell phone, tablet...) from vba access form

I need to get path string to android device or its SD card as be able to copy or get some files(e.g. pictures) to process further...
As I didn't find not so menu samples about...
I tried go get the file with file dialog f = Application.FileDialog... but the directory has not been showed in the dialog.
I follow some samples to get getExternalFilesDir(... but I get Sub or function not defined error message.
Simply I need to get file from let say this address:
Computer\HUAWEI M2-801L\Internal storage\DCIM\Camera\12.jpg
I tried to use Environ() go get external directory but I didn't success to open folder.
As well I need to count items there or choose the latest record etc in that directory etc.
I tried to work with WIA COMMON DIALOG but I stuck over there as well
please anyone to help

TestCafe Click Spawned Pop Up to Save CSV File

I can't find any way to click "Save" on a pop up that spawns during a test. TestCafe needs to click the "Save" button so I can obtain the CSV file.
I've tried searching for a way to do this in the docs but the closest thing I found so far is .pressKey('enter'). However, this fails to click 'Save' and I don't know what other options I have.
Screenshot of exactly what I'm trying to click:
enter image description here
I provided the end of my code (you'll have to assume all the prior parts of a TestCafe test are preceeding this:
.click(export_button)
.click(csv_pill)
.wait(3000)
.pressKey('enter')
I expect to somehow be able to have the mouse detect this 'Save' button and it clicks it to save this CSV file.
TestCafe cannot test native browser dialogs. They should be prevented. If you encountered this behavior during the test, please create a bug report with a simple example page or link to a tested site.

inject text from javascript to html "View source"

When I change text using JavaScript The text does not appear in the HTML "View source". Is it possible to inject information to the HTML "View source". (When I write View source I mean to While you pressing on the right mouse button in the browser you can view the source code That returns from the server)
View Source shows you only the HTML it received from the server's response. Your JS changes happen afterward.
Firebug and Chrome's debugger show you the source dynamically so you can see the DOM and HTML as it has been changed. But view source will only ever show you what the browser received from the server.
Well,
You have said it right. When you "View source" you see what was received from the server, and elements that you added dynamically using javascript do not exist there.
If you want to see elements which you added later, you can do that using Inspect element (CTRL + SHIFT + I), which will show you current html structure displayed in browser.
When you "view source" in a browser, it is opening a window and printing the source code to the current page. This text is totally static, nothing will change its contents besides manually refreshing.
If you want the HTML source you are looking at to reflect changes you make to the page, you need to use your browsers Dev Tools. Try Right Click->Inspect Element instead of Right Click->View Source
Some techniques:
In some browsers Ctrl-A to select the whole rendered page content
and, with a right click View Source of selection, gives the source as generated by
rendering scripts. (often <script> elements are gone and replaced
by the rendered content)
Augment the address bar URI by prepending view-source: to get the
original source.
Use the menu bar or right click View Source interfaces.
With these techniques and FF it is possible to get different sources for a "static" page in the rendering chronology.
Technique #1 is interesting when automated ... along the lines of:
generate a page that displays the time in seconds,
select whole page,
render the source view of the selection
repeat periodically
quasi code:
setInterval ( write Date() to page, select all, write view source of selection to page ) every second

flex 3 screenshot of the scene

i want to snapshot of the flex scene and save it as a image. It likes printscreen button and paste it to paint and save
there will a button save it to desktop and when pressed it, flex will save the screenshot of scene to the desktop, i searched on the net but couldn't find a working code
It looks like there is a way to do it, but it requires some serverside work. Basically the data is sent to the server and the server saves it.
What you would probably want to do since you want the user to have the screenshot is create the files on the server then have it open a web page where they can download and save it.
more information is here http://www.boyzoid.com/blog/index.cfm/2007/9/17/Doing-screenshots-in-Flex-and-sending-them-to-ColdFusion