You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def click_item(self,id, wait=5):
element = self.driver.find_element_by_id(id)
element.click()
sleep(wait)
Output:
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: unknown error: Element <div class="item item-toggle toggle-small ng-not-empty ng-valid" id="testaut_useauth_toggle" ng-change="toggleAuth()" ng-model="wizard.useauth" toggle-class="toggle-calm" style="">...</div> is not clickable at point (180, 190). Other element would receive the click: <section ng-show="selected" ng-class="{current: selected, done: completed}" class="step current" ng-transclude="" wz-title="2" style="">...</section>
(Session info: chrome=55.0.2883.91)
def tap_item(self,id,wait=5):
l = element.location
s = element.size
print ("HERE {} & {}".format(l,s))
factor = float(3.428) # emulator VM reported size / screen size
tapX = 286 * factor # I loaded the image in an editor and found the center of the toggle
tapY = 190 * factor
old_context = self.driver.current_context
self.driver.switch_to.context("NATIVE_APP")
actions = TouchAction(self.driver)
print ("TAPPING AT {}:{}".format(str(tapX), str(tapY)))
actions.tap(None,tapX, tapY,1)
actions.perform()
self.driver.switch_to.context(old_context)
sleep(wait)
Output: nothing happens
The text was updated successfully, but these errors were encountered:
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: unknown error: Element
...
is not clickable at point (180, 190). Other element would receive the click: ...
Yes, the error is the same as that specific SO thread, but none of the (very diverse) solutions actually worked. That being said, I'm going to close this out as I figured out how to handle this element. I had to get more specific after looking at how the toggle button was implemented and after some experimentation on which sub-element needs to be the target of the click.
Final solution:
def tap_toggle(id,wait=Wait.TOGGLE):
element = driver.find_element_by_id(id)
element = element.find_element_by_tag_name('label')
element.click()
sleep(wait)
The problem
I am developing an app using ionic (v1). Ionic has an
<ion-toggle>
button (that is essentially a glorified checkbox) that I am not able to toggleEnvironment
Details
This is the toggle I am trying to click:
See code below
My template:
Invocation of code in appium test script:
1st implementation:
Output:
2nd Implementation:
Output:
No error, but nothing happens
3rd implementation:
Output: nothing happens
The text was updated successfully, but these errors were encountered: