# -*- coding: utf-8 -*-
import codecs, filecmp, os, subprocess, sys
def main():
startApplication("sasview")
mouseClick(waitForObject(":groupBox_6.cbCategory_QComboBox_2"), 144, 11, 0, Qt.LeftButton)
mouseClick(waitForObjectItem(":groupBox_6.cbCategory_QComboBox_2", "Shape Independent"), 124, 2, 0, Qt.LeftButton)
mouseClick(waitForObject(":groupBox_6.cbModel_QComboBox_2"), 119, 10, 0, Qt.LeftButton)
mouseClick(waitForObjectItem(":groupBox_6.cbModel_QComboBox_2", "fractal\\_core\\_shell"), 96, 5, 0, Qt.LeftButton)
clickButton(waitForObject(":FittingWidgetUI.cmdPlot_QPushButton_2"))
snooze(2)
clickButton(waitForObject(":FittingWidgetUI.cmdPlot_QPushButton_2"))
snooze(3)
openContextMenu(waitForObject(":qt_workspacechild_FigureCanvasQTAgg"), 160, 186, 0)
activateItem(waitForObjectItem(":MainWindow_QMenu", "M1 [fractal\\_core\\_shell]"))
activateItem(waitForObjectItem(":M1 [fractal_core_shell]_QMenu", "DataInfo"))
test.compare(str(waitForObjectExists(":Data Info: M1 [fractal_core_shell]_QTextEdit").windowTitle), "Data Info: M1 [fractal_core_shell]")
test.compare(str(waitForObjectExists(":Data Info: M1 [fractal_core_shell]_QTextEdit").plainText), "File: M1 [fractal_core_shell]\nTitle: M1 [fractal_core_shell]\nRun: []\nSESANS: None\nInstrument: \nSample:\n ID: \n Transmission: None\n Thickness: None [mm]\n Temperature: None [None]\n Position: x = None y = None z = None [mm]\n Orientation: x = None y = None z = None [degree]\n Details:\n\nSource:\n Radiation: None\n Shape: None\n Wavelength: None [A]\n Waveln_min: None [nm]\n Waveln_max: None [nm]\n Waveln_spread:None [percent]\n Beam_size: x = None y = None z = None [mm]\n\n\nData:\n Type: Data1D\n X-axis: \\rm{Q} [A^{-1}]\n Y-axis: \\rm{Intensity} [cm^{-1}]\n Length: 25\n\nData Min Max:\nX_min = 0.005: X_max = 0.1\nY_min = 0.00577961925859: Y_max = 1592.22664984\ndY_min = 0.0: dY_max = 0.0\n\nData Points:\n Minimum value on the x-axis for the plotted data. Maximum value on the x-axis for the plotted data. Fit value for the slope parameter. Fit value for the constant parameter.
χ2 over degrees of freedom.
") test.compare(str(waitForObjectExists(":groupBox.txtChi2_QLineEdit").text), "0") clickButton(waitForObject(":LinearFitUI.cmdClose_QPushButton")) openContextMenu(waitForObject(":qt_workspacechild_FigureCanvasQTAgg"), 352, 244, 0) activateItem(waitForObjectItem(":MainWindow_QMenu", "M1 [fractal\\_core\\_shell]")) activateItem(waitForObjectItem(":M1 [fractal_core_shell]_QMenu", "Modify Plot Property")) sendEvent("QMoveEvent", waitForObject(":PlotPropertiesUI_PlotProperties"), 745, 331, 937, 348) test.compare(waitForObjectExists(":PlotPropertiesUI_PlotProperties").visible, True) test.compare(str(waitForObjectExists(":PlotPropertiesUI_PlotProperties").windowTitle), "Modify Plot Properties") test.compare(str(waitForObjectExists(":groupBox.cbShape_QComboBox").currentText), "Line") test.compare(waitForObjectExists(":groupBox.cbShape_QComboBox").currentIndex, 17) test.compare(waitForObjectExists(":groupBox.cbShape_QComboBox").count, 21) test.compare(str(waitForObjectExists(":groupBox.qt_spinbox_lineedit_QLineEdit").displayText), "5") test.compare(waitForObjectExists(":groupBox.cbColor_QComboBox").count, 7) test.compare(str(waitForObjectExists(":groupBox.cbColor_QComboBox").currentText), "Blue") test.compare(waitForObjectExists(":groupBox.cbColor_QComboBox").currentIndex, 0) test.compare(str(waitForObjectExists(":groupBox.cmdCustom_QPushButton").text), "Custom..") test.compare(str(waitForObjectExists(":qt_workspacechild.txtLegend_QLineEdit").text), "M1 [fractal_core_shell]") test.compare(waitForObjectExists(":qt_workspacechild.txtLegend_QLineEdit").visible, True) mouseClick(waitForObject(":groupBox.cbShape_QComboBox"), 135, 13, 0, Qt.LeftButton) mouseClick(waitForObjectItem(":groupBox.cbShape_QComboBox", "Triangle Down"), 116, 5, 0, Qt.LeftButton) spinUp(waitForObject(":groupBox.sbSize_QSpinBox")) doubleClick(waitForObject(":groupBox.sbSize_QSpinBox"), 33, 6, 0, Qt.LeftButton) clickButton(waitForObject(":qt_workspacechild.OK_QPushButton_2")) #test.vp("VP1") #sendEvent("QMouseEvent", waitForObject(":qt_workspacechild_FigureCanvasQTAgg_2"), QEvent.MouseButtonPress, 230, 166, Qt.RightButton, 2, 0) sendEvent("QMouseEvent", waitForObject(":qt_workspacechild_FigureCanvasQTAgg"), QEvent.MouseButtonRelease, 230, 166, Qt.RightButton, 0, 0) openContextMenu(waitForObject(":qt_workspacechild_FigureCanvasQTAgg"), 230, 166, 0) activateItem(waitForObjectItem(":MainWindow_QMenu", "M1 [fractal\\_core\\_shell]")) activateItem(waitForObjectItem(":M1 [fractal_core_shell]_QMenu", "Modify Plot Property")) mouseClick(waitForObject(":groupBox.cbShape_QComboBox"), 70, 13, 0, Qt.LeftButton) mouseClick(waitForObject(":groupBox.cbShape_QComboBox"), 70, 13, 0, Qt.LeftButton) mouseClick(waitForObject(":groupBox.cbShape_QComboBox"), 58, 7, 0, Qt.LeftButton) mouseClick(waitForObjectItem(":groupBox.cbShape_QComboBox", "Vline"), 93, 7, 0, Qt.LeftButton) mouseClick(waitForObject(":groupBox.cbColor_QComboBox"), 54, 7, 0, Qt.LeftButton) mouseClick(waitForObjectItem(":groupBox.cbColor_QComboBox", "Magenta"), 31, 9, 0, Qt.LeftButton) mouseDrag(waitForObject(":qt_workspacechild.txtLegend_QLineEdit"), 20, 13, 116, -2, 1, Qt.LeftButton) type(waitForObject(":qt_workspacechild.txtLegend_QLineEdit"), "