My camera marks HDR images quite clearly: They are a sequence of images, where the first second one and third one are equally many stops removed from the first one, and they’re usually within a couple of seconds from one-another, with all other settings the same. That sounds like something that should be easy to stack in the import-process, right? Preferably followed up by a rendering to a 32-bit pr channel image straight afterward that is set as the stack top image.

Unfortunately, I don’t know Lua, so I won’t write it myself any time soon. But such a trivial plugin should exist after all these iterations. Heck, it should be a core functionality!

As for grouping, possibly even a quick pre-rendering, I’d argue there should be a similar Panorama function.

Can anyone recommend any plugins?


Today I needed to work with an alertview, so here are two steps for pressing them:

`Given /^I press alert button (\d+)$/ do |index|
touch(“view:’UIAlertButton’”)[index]
end

Given /^I press alert button named “([^”]*)”$/ do |text|
touch(“view:’UIAlertButton’ label text:’#{text}’”)
end
`


As promised, here are my reusable Calabash steps. Now, some of these are probably more inspirational than reusable (or ignorable, if you like ;-) ), but this is ALL the steps I use SO FAR apart from the standard steps. Like I said before, there are so many great steps already defined, so check them out. Anyway, here they are, all 134 lines:

`Given /^I press the “([^\”]*)” tableviewcell button$/ do |cell|
touch(“tableViewCell button marked:’” + cell + “‘“)
end

Given /^I press the “([^”]*)” label$/ do |label|
touch(“view label text:’#{label}’”)
end

Then /^I enter “([^\”])” in the “([^\”])” (?:text|input) field$/ do |text_to_type, field_name|
set_text(“textField placeholder:’#{field_name}’”, text_to_type)
sleep(STEP_PAUSE)
end

Given /^I press the “([^”]*)” segment$/ do |label|
touch(“segmentedControl segment marked:’#{label}’”)
end

Given /^I see the text “([^”])” to the right of the text “([^”])”$/ do |right, left|
leftRect = query(“label {text LIKE ‘#{left}‘} parent view:’PdfThumbnailView’”, :frame)[0]
screenshot_and_raise “Text \”#{left}\” could not be found” if(leftRect == nil)
leftX = Integer(leftRect[/{(.
), (.)}, {(.), (.)}/,1].split(“{“)[1])
leftY = Integer(leftRect[/{(.
), (.)}, {(.), (.*)}/,2])

rightRect = query(“label {text LIKE ‘#{right}‘} parent view:’PdfThumbnailView’”, :frame)[0]
screenshot_and_raise “Text \”#{right}\” could not be found” if(rightRect == nil)
rightX = Integer(rightRect[/{(.
), (.)}, {(.), (.)}/,1].split(“{“)[1])
rightY = Integer(rightRect[/{(.
), (.)}, {(.), (.*)}/,2])

screenshot_and_raise “The following texts should be on the same horizontal line: \”#{left}\” \”#{right}\”” if(leftY != rightY)
screenshot_and_raise “The text \”#{right}\” is not to the right of the text \”#{left}\”” if(leftX >= rightX)
end

Given /^I see the text “([^”])” beneath the text “([^”])”$/ do |bottom, top|
bottomRect = query(“label {text LIKE ‘#{bottom}‘} parent view:’PdfThumbnailView’”, :frame)[0]
screenshot_and_raise “Text \”#{bottom}\” could not be found” if(bottomRect == nil)
bottomX = Integer(bottomRect[/{(.
), (.)}, {(.), (.)}/,1].split(“{“)[1])
bottomY = Integer(bottomRect[/{(.
), (.)}, {(.), (.*)}/,2])

topRect = query(“label {text LIKE ‘#{top}‘} parent view:’PdfThumbnailView’”, :frame)[0]
screenshot_and_raise “Text \”#{top}\” could not be found” if(topRect == nil)
topX = Integer(topRect[/{(.
), (.)}, {(.), (.)}/,1].split(“{“)[1])
topY = Integer(topRect[/{(.
), (.)}, {(.), (.*)}/,2])

screenshot_and_raise “The following texts should be on the same vertical line: \”#{top}\” \”#{bottom}\”” if(topX != bottomX)
screenshot_and_raise “The text \”#{bottom}\” is not beneath the text \”#{top}\”” if(topY >= bottomY)
end

Given /^I don’t see the “([^”]*)” button$/ do |expected_mark|
res = query “button”, :accessibilityLabel
index = res.find_index {|s| s == expected_mark}
screenshot_and_raise “Index should be nil (was: #{index})” if (index != nil)
end

Given /^I scroll to “([^”]*)”$/ do |searchText|
res = query “TableView index:1 TableViewCell label”, :text
row = res.find_index {|s| s == searchText}
scroll_to_row :tableView, row
sleep(STEP_PAUSE)
end

Given /^given I import “([^”])”, “([^”])”, “([^”])”, “([^”])”$/ do |datasource, maindir, subdir, file|
touch(“tableViewCell label text:’All files’”)
sleep(STEP_PAUSE)
touch(“tableViewCell label text:’#{datasource}’”)
macro %Q|I wait until I don’t see “Loading…”|
touch(“tableViewCell label text:’#{maindir}’”)
macro %Q|I wait until I don’t see “Loading…”|
touch(“tableViewCell label text:’#{subdir}’”)
macro %Q|I wait until I don’t see “Loading…”|
touch(“tableViewCell label text:’#{file}’”)
sleep(STEP_PAUSE)
touch(“tableViewCell label text:’All files’”)
sleep(STEP_PAUSE)
end

Given /^given I import “([^”])”, “([^”])”, “([^”]*)”$/ do |datasource, maindir, file|
touch(“tableViewCell label text:’All files’”)
sleep(STEP_PAUSE)
touch(“tableViewCell label text:’#{datasource}’”)
macro %Q|I wait until I don’t see “Loading…”|
touch(“tableViewCell label text:’#{maindir}’”)
macro %Q|I wait until I don’t see “Loading…”|
touch(“tableViewCell label text:’#{file}’”)
sleep(STEP_PAUSE)
touch(“tableViewCell label text:’All files’”)
sleep(STEP_PAUSE)
end

Given /^I remove all my documents$/ do
docs = query(“view:’PdfThumbnailView’”)
docs.each do |pdfView|
touch(“button marked:’EditCards’”)
sleep(STEP_PAUSE)
touch(“view:’PdfThumbnailView’ index:0 button marked:’card function delete’”)
sleep(STEP_PAUSE)
touch(“button marked:’Delete file’”)
sleep(STEP_PAUSE)
touch(“button marked:’EditCards’”)
sleep(STEP_PAUSE)
end
end

Given /^I remove all my folders$/ do
if(query(“label marked:’My folders’”).count > 0)
titleRect = query(“label marked:’My folders’ parent view”, :frame)[0]
titleX = Integer(titleRect[/{(.), (.)}, {(.), (.)}/,1].split(“{“)[1])
titleY = Integer(titleRect[/{(.), (.)}, {(.), (.)}/,2])

count = query(“tableViewCell”).count
i = 0
while i < count do
cellRect = query(“view:’FolderTableViewCell’ index:#{i} view”, :frame)[0]
cellX = Integer(cellRect[/{(.), (.)}, {(.), (.)}/,1].split(“{“)[1])
cellY = Integer(cellRect[/{(.), (.)}, {(.), (.)}/,2])
if(cellX == titleX && cellY > titleY)
touch(“view:’FolderTableViewCell’ index:#{i} view”)
sleep(STEP_PAUSE)
touch(“view:’FolderTableViewCell’ index:#{i} button”)
sleep(STEP_PAUSE)
touch(“segmentedControl segment marked:’Delete folder’”)
sleep(STEP_PAUSE)

break
end
i = i + 1
end
end

macro %Q|I remove all my folders| if(query(“label marked:’My folders’”).count > 0)
end

Given /^I playback recording “([^”])” at label “([^”])”$/ do |movie, label|
playback movie, {:query => “label text:’#{label}’”}
end`


As promised, here’s the link from automatic UI testing. And here’s the PDF.


Everyone else is doing it, so I figured I could play “bingo” as well. :-)

My predictions begin with “one more thing” on the iPad event: iOS 6 and AppleTV are tightly linked. Developers will get access to iOS 6 betas within two weeks from the announcement, with another event where they go through all the cool stuff. But the AppleTV will be updated with an A5X processor and third party applications installed via the AppStore, and will sport Siri and iCloud integration in a way that makes it easier to use than ever.

The iPad 3 will be announced with an A6 processor, which has enough RAM to power the retina display. The A6 will be more or less identical to the Tegra 3. The iPad will ship with iOS 5.1, and will, together with the iPhone, get iOS 6.1 support this summer, iOS 6.0 will be AppleTV only. The iPad will of course get Siri support.

The main newcomer on the software platform will be Microsoft, shipping a full Office line (excluding MS Access) for iOS, multiplatform for iPhone and iPad, and with a tight AppleTV integration for presentation. The presentation will also focus on Microsoft and Apple having a great relation through iCloud.

iCloud will begin acting like more Dropbox in that it will let you share documents better between iOS apps and Mac apps, bringing iWork and iLife on the mac better integration with their iOS counterparts. This increases need for space, but the iCloud free space will rise. The iLife and iWork updates won’t be mentioned, but will come as a software update quietly a day or two after the show.