chore: Update comments to locator patches#724
chore: Update comments to locator patches#724KazuCocoa merged 4 commits intoappium:masterfrom VladimirPodolian:patch-1
Conversation
|
Each call to |
mykola-mokhnach
left a comment
There was a problem hiding this comment.
see the above comment
|
This one should work accurately when |
|
@mykola-mokhnach Hi, and thank you for answer. For WebDriver: class WebDriver(...):
def __init__(command_executor, desired_capabilities, ..., selenium_compatibility)
...
self.selenium_compatibility = selenium_compatibility
...
def find_element():
if self.selenium_compatibility:
if by == By.ID:
...
...For WebElement (need to define class WebElement(AppiumWebElementSearchContext):
def __init__(self, selenium_compatibility=False):
self.selenium_compatibility = selenium_compatibility
...
def find_element():
if self.selenium_compatibility:
if by == By.ID:
...
...Or only for |
|
This has nothing to do with selenium compatibility. Selenium itself has this code as a workaround to support legacy non-w3c compatible locators (the standard only defines To be honest I'm not very happy about keeping these workarounds here as locators id/name locator types are not going to be supported anyway, which encourages customers to update their tests instead of having the legacy stuff forever. In the worst case it is possible to do the same id/name -> css conversion directly in the client code with the same success. |
|
@mykola-mokhnach Understood. But what is the final decision here? You don't want to have this "Selenium workaround" in your own code, but it's commented right now. Can I just delete this "comment section" in this PR and do a self workaround in my side? |
|
The comment-out (TODO mark) was still we were learning selenium in the past. The TODO comment can be removed, but I need the comment-out ones to keep the diff about the workaround for future updates so far, so please keep the comment-out itself so far. |
Hi! I faced with an issue while using
appium.find_elementwith locators, that I used for my selenium tests. Is it possible to uncomment that block and use him inweb viewcontext only ?