1

I tried set value on slider. I can connect to it. But then I try set value catch _ctypes.COMError: (-2146233079, None, (None, None, None, 0, None)) I tried this, but it not helps.

Denis_N
  • 31
  • 8

1 Answers1

0

Hmm... This is interesting. We have working unit tests for standard WPF slider. See test_uiawrapper.py, line 780 for reference.

Everything looks the same in Inspect.exe also. But for WpfApplication1.exe it works.

[EDIT] Wait! You pass int number to set_value(...), how about float or str?

P.S. I can suggest a workaround since you should have "thumb" control as a child of the slider: slider.children(control_type="Thumb")[0]. You can play with rectangles of the slider and the thumb (.rectangle().mid_point()), then use click_input(coords=(x, y), absolute=False) with relative coordinates calculated for specified value. Or even .drag_mouse_input(...) is better, because one click should call just a small move in the direction of click.

Vasily Ryabov
  • 9,386
  • 6
  • 25
  • 78
  • yes, I tried to pass float and string to set_value(...). I had same results. "I can suggest a workaround since you should have "thumb" control as a child of the slider..." I thought about this decision, but I decided to wait for the answer. Looks like I'll have to do so. Thanks! – Denis_N Apr 22 '18 at 10:36