Skip to content

Conversation

sandeepsuryaprasad
Copy link
Contributor

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

This fixes the issue #12459 with ElementScrollBehavior

Motivation and Context

  • ElementScrollBehavior is an Enum object, but I was expecting it to be an int.
  • Now I have removed value attribute from ElementScrollBehavior.TOP.value and ElementScrollBehavior.BOTTOM.value

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • [] My change requires a change to the documentation.
  • [] I have updated the documentation accordingly.
  • [] I have added tests to cover my changes.
  • All new and existing tests passed.

@mgorny
Copy link
Contributor

mgorny commented Aug 1, 2023

Thanks for the fix but I'm afraid it doesn't solve the problem completely. For the fix to be complete, the following change is also necessary:

diff --git a/py/selenium/webdriver/ie/options.py b/py/selenium/webdriver/ie/options.py
index 34fc51f..3b0aea4 100644
--- a/py/selenium/webdriver/ie/options.py
+++ b/py/selenium/webdriver/ie/options.py
@@ -105,7 +105,7 @@ class Options(ArgOptions):
     `value`: `int` (Timeout) in milliseconds
     """
 
-    element_scroll_behavior = _IeOptionsDescriptor(ELEMENT_SCROLL_BEHAVIOR, int)
+    element_scroll_behavior = _IeOptionsDescriptor(ELEMENT_SCROLL_BEHAVIOR, Enum)
     """Gets and Sets `element_scroll_behavior`
 
     Usage

@diemol
Copy link
Member

diemol commented Aug 1, 2023

@sandeepsuryaprasad thoughts?

@sandeepsuryaprasad
Copy link
Contributor Author

Thanks for the fix but I'm afraid it doesn't solve the problem completely. For the fix to be complete, the following change is also necessary:

diff --git a/py/selenium/webdriver/ie/options.py b/py/selenium/webdriver/ie/options.py
index 34fc51f..3b0aea4 100644
--- a/py/selenium/webdriver/ie/options.py
+++ b/py/selenium/webdriver/ie/options.py
@@ -105,7 +105,7 @@ class Options(ArgOptions):
     `value`: `int` (Timeout) in milliseconds
     """
 
-    element_scroll_behavior = _IeOptionsDescriptor(ELEMENT_SCROLL_BEHAVIOR, int)
+    element_scroll_behavior = _IeOptionsDescriptor(ELEMENT_SCROLL_BEHAVIOR, Enum)
     """Gets and Sets `element_scroll_behavior`
 
     Usage

@mgorny Thank You so much for pointing this out.. I am fixing it. I am really sorry for forgetting to change the expected type .. I am fixing it right away and I will push it.

@sandeepsuryaprasad
Copy link
Contributor Author

@sandeepsuryaprasad thoughts?

Fixing it. Forgot to change the expected type..

@sandeepsuryaprasad
Copy link
Contributor Author

@mgorny @diemol I have fixed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: test/unit/selenium/webdriver/ie/test_ie_options.py::test_element_scroll_behavior fails w/ selenium-python 4.11.0
3 participants