import os
address = os.getcwd()
#address = "/home/es1076/GITROOT/GoFigure2/Testing/Sikuli/gofigure2_images"
#address = address+"/gofigure2_images"
print address
setBundlePath(address)
start = time.time()
#Need to get to a new book mark spot in the easiest way to add a new one.
Tests = ("Cancel","No Name","Add New","Existing Name","Bookmark exists")
for i in Tests:
click(
)
click(
)
if i == "Cancel":
click(
)
#assert that goes back to same bookmark state
if i == "No Name":
click(
)
#assert popup message exists
click(
)
click(
)
if i == "Add New":
wait(1)
type("Test Bookmark")
type(Key.TAB+Key.TAB+Key.TAB)
type("Test Description")
click(
)
#assert that bookmark is in dropdown menu
#assert that bookmark is in database
if i == "Existing Name":
wait(1)
type("Test Bookmark")
#first tab goes to cancel, then ok then description box
type(Key.TAB+Key.TAB+Key.TAB)
type("Test Description")
click(
)
#assert popup message exists
click(
)
click(
)
if i == "Bookmark exists":
#To test that this bookmark already exists.
click(
)
type("This book mark already exists")
click(
)
#assert popup message exists
click(
)
#need to select an existing bookmark and then add new book mark with different name
#To test bookmark description shows up
click(
)
click(
)
wait(2)
hover(
)
wait(5)
print "I'm waiting to find the description below"
#x = Region(4,990,200,10).find("Bookmark_Description.png")
assert exists(
)
print "I found it"
#Test bookmark deletion
#Delete + cancel
click(
)
click(
)
click(
)
Region(500,282,283,271).click(
)
click(
)
#Delete + ok
click(
)
click(
)
click(
)
Region(500,282,283,271).click(
)
click(
)
click(
)
#finally need to click on a different bookmark to see that quadview changes
end = time.time()
elapsedSec = end - start
print elapsedSec, "sec"