本文整理汇总了Python中uitest.uihelper.calc.enter_text_to_cell函数的典型用法代码示例。如果您正苦于以下问题:Python enter_text_to_cell函数的具体用法?Python enter_text_to_cell怎么用?Python enter_text_to_cell使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了enter_text_to_cell函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_tdf125051_crash_spelling_dialog
def test_tdf125051_crash_spelling_dialog(self):
calc_doc = self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
document = self.ui_test.get_component()
enter_text_to_cell(gridwin, "A1", "text")
gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
self.ui_test.execute_dialog_through_command(".uno:SpellDialog")
xDialog = self.xUITest.getTopFocusWindow() #Spelling dialog
xDialog2 = self.xUITest.getTopFocusWindow() # info dialog "The spellcheck of this sheet has been completed.-> OK"
okBtn = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(okBtn)
xDialog = self.xUITest.getTopFocusWindow() #Spelling dialog
#open options
optionsBtn = xDialog.getChild("options")
def handle_options_dlg(dialog):
#print(dialog.getChildren())
xCancelBtn = dialog.getChild("cancel")
self.ui_test.close_dialog_through_button(xCancelBtn)
self.ui_test.execute_blocking_action(optionsBtn.executeAction, args=('CLICK', ()),
dialog_handler=handle_options_dlg)
closeBtn = xDialog.getChild("close") #close Spelling dialog
self.ui_test.close_dialog_through_button(closeBtn)
#verify, we didn't crash
self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "text")
self.ui_test.close_doc()
示例2: test_validation
def test_validation(self):
self.ui_test.create_doc_in_start_center("calc")
xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
xGridWin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C10"}))
self.ui_test.execute_dialog_through_command(".uno:Validation")
xValidationDlg = self.xUITest.getTopFocusWindow()
xAllowList = xValidationDlg.getChild("allow")
xAllowList.executeAction("SELECT", mkPropertyValues({"POS": "1"}))
xData = xValidationDlg.getChild("data")
xData.executeAction("SELECT", mkPropertyValues({"POS": "5"}))
xVal = xValidationDlg.getChild("max")
xVal.executeAction("TYPE", mkPropertyValues({"TEXT":"0"}))
xOkBtn = xValidationDlg.getChild("ok")
self.ui_test.close_dialog_through_button(xOkBtn)
def enter_text(cell, text):
enter_text_to_cell(xGridWin, cell, text)
self.ui_test.execute_blocking_action(enter_text, "ok", args=("A1", "abc"))
self.ui_test.execute_blocking_action(enter_text, "ok", args=("B6", "2.18"))
enter_text_to_cell(xGridWin, "C2", "24")
self.ui_test.close_doc()
示例3: test_paste_only
def test_paste_only(self):
calc_doc = self.ui_test.create_doc_in_start_center("calc")
xTopWindow = self.xUITest.getTopFocusWindow()
document = self.ui_test.get_component()
gridwin = xTopWindow.getChild("grid_window")
enter_text_to_cell(gridwin, "A1", "=SUM(A2:A3)")
gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
self.xUITest.executeCommand(".uno:Copy")
gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "C1"}))
self.xUITest.executeCommand(".uno:PasteOnlyText")
self.assertEqual(get_cell_by_position(document, 0, 2, 0).getString(), "")
gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "D1"}))
self.xUITest.executeCommand(".uno:PasteOnlyValue")
self.assertEqual(get_cell_by_position(document, 0, 3, 0).getString(), "0")
self.assertEqual(get_cell_by_position(document, 0, 3, 0).getValue(), 0)
gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "E1"}))
self.xUITest.executeCommand(".uno:PasteOnlyFormula")
self.assertEqual(get_cell_by_position(document, 0, 4, 0).getString(), "0")
self.assertEqual(get_cell_by_position(document, 0, 4, 0).getValue(), 0)
self.assertEqual(get_cell_by_position(document, 0, 4, 0).getFormula(), "=SUM(E2:E3)")
self.ui_test.close_doc()
示例4: test_protect_sheet
def test_protect_sheet(self):
calc_doc = self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
document = self.ui_test.get_component()
#enter password - lock
self.ui_test.execute_dialog_through_command(".uno:Protect")
xDialog = self.xUITest.getTopFocusWindow()
xprotect = xDialog.getChild("protect")
xpassword1 = xDialog.getChild("password1")
xpassword2 = xDialog.getChild("password2")
if (get_state_as_dict(xprotect)["Selected"]) == "false":
xprotect.executeAction("CLICK", tuple())
xpassword1.executeAction("TYPE", mkPropertyValues({"TEXT":"aa"}))
xpassword2.executeAction("TYPE", mkPropertyValues({"TEXT":"aa"}))
xOKBtn = xDialog.getChild("ok")
# self.ui_test.close_dialog_through_button(xOKBtn)
xOKBtn.executeAction("CLICK", tuple())
#Unlock
self.ui_test.execute_dialog_through_command(".uno:Protect")
xDialog = self.xUITest.getTopFocusWindow()
xpass1ed = xDialog.getChild("pass1ed")
xpass1ed.executeAction("TYPE", mkPropertyValues({"TEXT":"aa"}))
xOKBtn = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOKBtn)
#Verify - the sheet is unlocked
enter_text_to_cell(gridwin, "B2", "A")
self.assertEqual(get_cell_by_position(document, 0, 1, 1).getString(), "A")
self.ui_test.close_doc()
示例5: test_paste_special
def test_paste_special(self):
# EN-8:Paste special with options
# This test is to check that paste special combined with some options and link is ok.
# Refers to tdf#84810
self.ui_test.create_doc_in_start_center("calc")
# Write text to cell A1
xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
enter_text_to_cell(xGridWin, "A1", "abcd")
# Copy cell A1 to clipboard
xGridWin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
self.xUITest.executeCommand(".uno:Copy")
# Set cursor to cell A3
xGridWin.executeAction("SELECT", mkPropertyValues({"CELL": "A3"}))
# Choose Paste Special Options and paste data
self.ui_test.execute_dialog_through_command(".uno:PasteSpecial")
xPasteSpecialDlg = self.xUITest.getTopFocusWindow()
xAllChkBox = xPasteSpecialDlg.getChild("paste_all")
xAllChkBox.executeAction("CLICK", tuple())
xLinkChkBox = xPasteSpecialDlg.getChild("link")
xLinkChkBox.executeAction("CLICK", tuple())
xOkBtn = xPasteSpecialDlg.getChild("ok")
self.ui_test.close_dialog_through_button(xOkBtn)
# Assert successful paste
document = self.ui_test.get_component()
self.assertEqual(get_cell_by_position(document, 0, 0, 2).getString(), "abcd")
self.ui_test.close_doc()
示例6: test_expand
def test_expand(self):
self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
xGridWindow = xCalcDoc.getChild("grid_window")
enter_text_to_cell(xGridWindow, "B2", "=2+3+4")
xGridWindow.executeAction("SELECT", mkPropertyValues({"CELL": "B2"}))
self.ui_test.execute_modeless_dialog_through_command(".uno:FunctionDialog")
xFunctionDlg = self.xUITest.getTopFocusWindow()
xTabs = xFunctionDlg.getChild("tabs")
select_pos(xTabs, "1")
xTreelist = xTabs.getChild("struct")
xTreeEntry = xTreelist.getChild('0')
xTreeEntry.executeAction("COLLAPSE", tuple())
xTreeEntry.executeAction("EXPAND", tuple())
xCancelBtn = xFunctionDlg.getChild("cancel")
xCancelBtn.executeAction("CLICK", tuple())
self.ui_test.close_doc()
示例7: test_tdf43078_insert_and_delete_sheet_insert_text
def test_tdf43078_insert_and_delete_sheet_insert_text(self):
self.ui_test.create_doc_in_start_center("calc")
document = self.ui_test.get_component()
nrSheets = document.Sheets.getCount() #default number of sheets
self.ui_test.execute_dialog_through_command(".uno:Insert") #insert sheet
xDialog = self.xUITest.getTopFocusWindow()
xOKButton = xDialog.getChild("ok")
xOKButton.executeAction("CLICK", tuple())
self.ui_test.execute_dialog_through_command(".uno:Insert") #insert sheet
xDialog = self.xUITest.getTopFocusWindow()
xOKButton = xDialog.getChild("ok")
xOKButton.executeAction("CLICK", tuple())
self.assertEqual(document.Sheets.getCount(), nrSheets + 2)
xCalcDoc = self.xUITest.getTopFocusWindow()
xGridWindow = xCalcDoc.getChild("grid_window")
enter_text_to_cell(xGridWindow, "B2", "abcd")
self.ui_test.execute_dialog_through_command(".uno:Remove") #delete sheet
xDialog = self.xUITest.getTopFocusWindow()
xOKButton = xDialog.getChild("yes")
xOKButton.executeAction("CLICK", tuple())
self.assertEqual(document.Sheets.getCount(), nrSheets + 1)
self.xUITest.executeCommand(".uno:Undo")
self.assertEqual(document.Sheets.getCount(), nrSheets + 2)
self.xUITest.executeCommand(".uno:Redo")
self.assertEqual(document.Sheets.getCount(), nrSheets + 1)
self.ui_test.close_doc()
示例8: test_tdf44398_find_replace_regexp
def test_tdf44398_find_replace_regexp(self):
calc_doc = self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
document = self.ui_test.get_component()
# 1. A1 => 123456
enter_text_to_cell(gridwin, "A1", "123456")
# 2. ctrl-h, in dialog
# Search: ([0-9])
# Replace: $1
# check regular expression
# hit replace all
self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog")
xDialog = self.xUITest.getTopFocusWindow()
searchterm = xDialog.getChild("searchterm")
searchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
searchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"}))
searchterm.executeAction("TYPE", mkPropertyValues({"TEXT":"([0-9])"}))
replaceterm = xDialog.getChild("replaceterm")
replaceterm.executeAction("TYPE", mkPropertyValues({"TEXT":"$1"})) #replace textbox
regexp = xDialog.getChild("regexp")
regexp.executeAction("CLICK", tuple()) #regular expressions
replaceall = xDialog.getChild("replaceall")
replaceall.executeAction("CLICK", tuple())
xcloseBtn = xDialog.getChild("close")
self.ui_test.close_dialog_through_button(xcloseBtn)
#verify 3. A1 => 123456
self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "123456")
self.ui_test.close_doc()
示例9: test_clear_cells_all
def test_clear_cells_all(self):
calc_doc = self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
document = self.ui_test.get_component()
enter_text_to_cell(gridwin, "A1", "aa")
enter_text_to_cell(gridwin, "A2", "1")
gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A2"}))
self.xUITest.executeCommand(".uno:Bold")
self.ui_test.execute_dialog_through_command(".uno:Delete")
xDialog = self.xUITest.getTopFocusWindow()
xdeleteall = xDialog.getChild("deleteall")
xtext = xDialog.getChild("text")
xdatetime = xDialog.getChild("datetime")
xcomments = xDialog.getChild("comments")
xobjects = xDialog.getChild("objects")
xnumbers = xDialog.getChild("numbers")
xformulas = xDialog.getChild("formulas")
xformats = xDialog.getChild("formats")
if (get_state_as_dict(xdeleteall)["Selected"]) == "false":
xdeleteall.executeAction("CLICK", tuple())
xOKBtn = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOKBtn)
#Verify
self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString() , "")
self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString() , "")
self.ui_test.close_doc()
示例10: test_tdf73006_text_to_columns
def test_tdf73006_text_to_columns(self):
calc_doc = self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
document = self.ui_test.get_component()
#Add data
enter_text_to_cell(gridwin, "A2", "A B")
#select column A
gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
self.xUITest.executeCommand(".uno:SelectColumn")
# Data - Text to Columns
self.ui_test.execute_dialog_through_command(".uno:TextToColumns")
xDialog = self.xUITest.getTopFocusWindow()
xspace = xDialog.getChild("space")
if (get_state_as_dict(xspace)["Selected"]) == "false":
xspace.executeAction("CLICK", tuple())
# Click Ok
xOK = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOK)
#Verify
self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "A")
self.assertEqual(get_cell_by_position(document, 0, 1, 1).getString(), "B")
self.ui_test.close_doc()
# vim: set shiftwidth=4 softtabstop=4 expandtab:
示例11: test_clear_cells_formats
def test_clear_cells_formats(self):
calc_doc = self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
document = self.ui_test.get_component()
enter_text_to_cell(gridwin, "A1", "aa")
enter_text_to_cell(gridwin, "A2", "1")
gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A2"}))
self.xUITest.executeCommand(".uno:Bold")
self.ui_test.execute_dialog_through_command(".uno:Delete")
xDialog = self.xUITest.getTopFocusWindow()
xdeleteall = xDialog.getChild("deleteall")
xtext = xDialog.getChild("text")
xdatetime = xDialog.getChild("datetime")
xcomments = xDialog.getChild("comments")
xobjects = xDialog.getChild("objects")
xnumbers = xDialog.getChild("numbers")
xformulas = xDialog.getChild("formulas")
xformats = xDialog.getChild("formats")
if (get_state_as_dict(xdeleteall)["Selected"]) == "true":
xdeleteall.executeAction("CLICK", tuple())
if (get_state_as_dict(xtext)["Selected"]) == "true":
xtext.executeAction("CLICK", tuple())
if (get_state_as_dict(xdatetime)["Selected"]) == "true":
xdatetime.executeAction("CLICK", tuple())
if (get_state_as_dict(xcomments)["Selected"]) == "true":
xcomments.executeAction("CLICK", tuple())
if (get_state_as_dict(xobjects)["Selected"]) == "true":
xobjects.executeAction("CLICK", tuple())
if (get_state_as_dict(xnumbers)["Selected"]) == "true":
xnumbers.executeAction("CLICK", tuple())
if (get_state_as_dict(xformulas)["Selected"]) == "true":
xformulas.executeAction("CLICK", tuple())
if (get_state_as_dict(xformats)["Selected"]) == "false":
xformats.executeAction("CLICK", tuple())
xOKBtn = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOKBtn)
#Verify
gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog")
xDialog = self.xUITest.getTopFocusWindow()
xTabs = xDialog.getChild("tabcontrol")
select_pos(xTabs, "1") #tab Font
xstylelb = xDialog.getChild("weststylelb-cjk")
print(get_state_as_dict(xstylelb))
self.assertEqual(get_state_as_dict(xstylelb)["Text"], "Regular")
xOK = xDialog.getChild("ok")
xOK.executeAction("CLICK", tuple())
self.ui_test.close_doc()
示例12: test_tdf119954_second_db_range
def test_tdf119954_second_db_range(self):
calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf119954.ods"))
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
document = self.ui_test.get_component()
#* new document
#* in A1 enter 1
#* in C3 enter 2
#* on A1 define a database range 'aaa' with $Sheet1.$A$1
#* on C3 define a database range 'bbb' with $Sheet2.$C$3
#* in any cell enter formula =bbb
# => result is 1 instead of 2
#* place cell cursor on that formula cell again
# => see that the formula is =aaa instead of =bbb
gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
self.ui_test.execute_modeless_dialog_through_command(".uno:DefineDBName")
xDefineNameDlg = self.xUITest.getTopFocusWindow()
xEntryBox = xDefineNameDlg.getChild("entry")
type_text(xEntryBox, "aaa")
add = xDefineNameDlg.getChild("add")
assign = xDefineNameDlg.getChild("assign")
add.executeAction("CLICK", tuple())
xOkBtn = xDefineNameDlg.getChild("ok")
self.ui_test.close_dialog_through_button(xOkBtn)
gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
self.ui_test.execute_modeless_dialog_through_command(".uno:DefineDBName")
xDefineNameDlg = self.xUITest.getTopFocusWindow()
xEntryBox = xDefineNameDlg.getChild("entry")
assign = xDefineNameDlg.getChild("assign")
select_all(xEntryBox)
type_text(xEntryBox, "bbb")
select_all(assign)
type_text(assign, "$Sheet2.$C$3")
add.executeAction("CLICK", tuple())
xOkBtn = xDefineNameDlg.getChild("ok")
self.ui_test.close_dialog_through_button(xOkBtn)
enter_text_to_cell(gridwin, "B2", "=bbb")
gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"}))
self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 2)
enter_text_to_cell(gridwin, "C2", "=aaa")
gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"}))
self.assertEqual(get_cell_by_position(document, 0, 2, 1).getValue(), 1)
self.xUITest.executeCommand(".uno:Undo")
self.xUITest.executeCommand(".uno:Undo")
self.assertEqual(get_cell_by_position(document, 0, 2, 1).getValue(), 0)
self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 0)
self.assertEqual(get_cell_by_position(document, 0, 1, 2).getFormula(), "")
self.assertEqual(get_cell_by_position(document, 0, 1, 1).getFormula(), "")
self.ui_test.close_doc()
示例13: test_tdf79983_sort_list_case_sensitive
def test_tdf79983_sort_list_case_sensitive(self):
calc_doc = self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
document = self.ui_test.get_component()
enter_text_to_cell(gridwin, "A1", "AAA")
enter_text_to_cell(gridwin, "A2", "BBB")
enter_text_to_cell(gridwin, "A3", "CCC")
enter_text_to_cell(gridwin, "A4", "DDD")
gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A4"}))
#Tools / Options / LibreOffice Calc / Sort Lists
self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog
xDialogOpt = self.xUITest.getTopFocusWindow()
xPages = xDialogOpt.getChild("pages")
xCalcEntry = xPages.getChild('3') # Calc
xCalcEntry.executeAction("EXPAND", tuple())
xCalcSortEntry = xCalcEntry.getChild('5')
xCalcSortEntry.executeAction("SELECT", tuple()) #Sort List
#copy new list from selected cells
xcopy = xDialogOpt.getChild("copy")
xcopy.executeAction("CLICK", tuple())
xOKBtn = xDialogOpt.getChild("ok")
self.ui_test.close_dialog_through_button(xOKBtn)
gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A4"}))
gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DELETE"}))
enter_text_to_cell(gridwin, "A1", "AAA")
gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A4"}))
#fill down
self.ui_test.execute_dialog_through_command(".uno:FillSeries")
xDialog = self.xUITest.getTopFocusWindow()
xautofill = xDialog.getChild("autofill")
xautofill.executeAction("CLICK", tuple())
xOK = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOK)
#verify
self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "AAA")
self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "BBB")
self.assertEqual(get_cell_by_position(document, 0, 0, 2).getString(), "CCC")
self.assertEqual(get_cell_by_position(document, 0, 0, 3).getString(), "DDD")
#UNDO
self.xUITest.executeCommand(".uno:Undo")
#verify
self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "AAA")
self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "")
self.assertEqual(get_cell_by_position(document, 0, 0, 2).getString(), "")
self.assertEqual(get_cell_by_position(document, 0, 0, 3).getString(), "")
self.ui_test.close_doc()
# vim: set shiftwidth=4 softtabstop=4 expandtab:
示例14: test_input
def test_input(self):
self.ui_test.create_doc_in_start_center("calc")
xTopWindow = self.xUITest.getTopFocusWindow()
xGridWindow = xTopWindow.getChild("grid_window")
enter_text_to_cell(xGridWindow, "C3", "=A1")
enter_text_to_cell(xGridWindow, "A1", "2")
self.ui_test.close_doc()
示例15: test_natural_sorting_columns
def test_natural_sorting_columns(self):
calc_doc = self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
document = self.ui_test.get_component()
#enter data
enter_text_to_cell(gridwin, "A1", "MW-2")
enter_text_to_cell(gridwin, "B1", "MW-20")
enter_text_to_cell(gridwin, "C1", "MW-1")
enter_text_to_cell(gridwin, "D1", "MW-18")
gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:D1"}))
#Open sort dialog by DATA - SORT
self.ui_test.execute_dialog_through_command(".uno:DataSort")
xDialog = self.xUITest.getTopFocusWindow()
xTabs = xDialog.getChild("tabcontrol")
xleftright = xDialog.getChild("leftright")
select_pos(xTabs, "1")
xNatural = xDialog.getChild("naturalsort")
xleftright.executeAction("CLICK", tuple())
if (get_state_as_dict(xNatural)["Selected"]) == "false":
xNatural.executeAction("CLICK", tuple())
xOk = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOk)
#Verify
self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "MW-1")
self.assertEqual(get_cell_by_position(document, 0, 1, 0).getString(), "MW-2")
self.assertEqual(get_cell_by_position(document, 0, 2, 0).getString(), "MW-18")
self.assertEqual(get_cell_by_position(document, 0, 3, 0).getString(), "MW-20")
self.ui_test.close_doc()