1

I just recently incurred a lot of problem with selenium, especially with clicking the button and switch to the dialog box.

The main problem is that I can run it in my own laptop the Dell E7250 with is 12.5", but when I moved it to another computer which is also Dell but 14", the button cannot be clicked and all the code seems to be useless. While it did run well in my own laptop.

So I make a guess, that selenium performance will be affected by the dimension of the device, is it correct?

Hi, this is my code, I can run it with the 12.5" device, but when I transferred to the Dell E7250 device, it can no longer run. My code.

Ratmir Asanov
  • 6,237
  • 5
  • 26
  • 40

2 Answers2

3

Try to use the following code:

driver.set_window_size("your_width", "your_height", driver.window_handles[0])

where driver.window_handles[0] is the applied main window in the browser. Also, the last parameter is optional (can be omitted) and applied by default to the main window.

In such a way, you can test your responsive markup for any devices.

Hope it helps you!

Ratmir Asanov
  • 6,237
  • 5
  • 26
  • 40
1

Try using driver.set_window_size() so you can work with a constant window size across different devices.

Of course, I guess if you set a really high number for the window size you might have performances issues. But you can work with a small window size and scroll to your element using something like this.

Hugo
  • 1,106
  • 15
  • 25