Clicking on an “ion-toggle” using appiumion-option-button in protractor test - click not registeredAppium path issueAppium & Java : how to perform fast click actions?Unable to scroll Android app with Appium using Java ClientAppium Configuration JavaAppium driver - Click function is not workingAppium - PageFactory initElements is not workingHow to clear the LogEntries in appium?org.openqa.selenium.NoSuchElementException: Can't locate an element by this strategy: Locator map:Appium clicking dynamic list item

Offset in split text content

What is the meaning of "You've never met a graph you didn't like?"

How can I, as DM, avoid the Conga Line of Death occurring when implementing some form of flanking rule?

If the Dominion rule using their Jem'Hadar troops, why is their life expectancy so low?

Started in 1987 vs. Starting in 1987

A seasonal riddle

Can a Knock spell open the door to Mordenkainen's Magnificent Mansion?

Weird lines in Microsoft Word

Why is participating in the European Parliamentary elections used as a threat?

What properties make a magic weapon befit a Rogue more than a DEX-based Fighter?

Amorphous proper classes in MK

Recursively move files within sub directories

I keep switching characters, how do I stop?

What is this high flying aircraft over Pennsylvania?

PTIJ: Which Dr. Seuss books should one obtain?

Travelling in US for more than 90 days

Can you take a "free object interaction" while incapacitated?

Should I warn a new PhD Student?

Trouble reading roman numeral notation with flats

Relations between homogeneous polynomials

Would this string work as string?

Why would five hundred and five same as one?

Highest stage count that are used one right after the other?

Is there a distance limit for minecart tracks?



Clicking on an “ion-toggle” using appium


ion-option-button in protractor test - click not registeredAppium path issueAppium & Java : how to perform fast click actions?Unable to scroll Android app with Appium using Java ClientAppium Configuration JavaAppium driver - Click function is not workingAppium - PageFactory initElements is not workingHow to clear the LogEntries in appium?org.openqa.selenium.NoSuchElementException: Can't locate an element by this strategy: Locator map:Appium clicking dynamic list item













0















I am unable to activate an <ion-toggle> button using appium/python client.



Here is the HTML template:



<ion-toggle id="testaut_useauth_toggle" 
ng-change="toggleAuth()"
ng-model="wizard.useauth"
toggle-class="toggle-calm">'kWizUseAuth'
</ion-toggle>


My appium test.py code:



self.click_item("testaut_useauth_toggle")
def click_item(self,id, wait=5):
element = self.driver.find_element_by_id(id)
element.click()
sleep(wait)


The error I get:



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)


The "other element" , "wz-title" is basically an angular wizard template I am using. It is used by my app in other screens too, and I have no problem clicking on buttons, so the issue is with this toggle switch (which ionic implements as a checkbox)



Alternate approach that I tried and failed:



def tap_item(self,id,wait=5):
print ('Tapping item: '.format(id))
element = self.driver.find_element_by_id(id)
#self.driver.execute_script("arguments[0]).click();", element);
self.driver.execute_script("document.getElementById(arguments[0]).click();", id);


There is no error here, but it doesn't activate



Any help would be appreciated.



Given this is a web app, I can't really get any location. Tap doesn't work because the method is not implemented for a WebView










share|improve this question




























    0















    I am unable to activate an <ion-toggle> button using appium/python client.



    Here is the HTML template:



    <ion-toggle id="testaut_useauth_toggle" 
    ng-change="toggleAuth()"
    ng-model="wizard.useauth"
    toggle-class="toggle-calm">'kWizUseAuth'
    </ion-toggle>


    My appium test.py code:



    self.click_item("testaut_useauth_toggle")
    def click_item(self,id, wait=5):
    element = self.driver.find_element_by_id(id)
    element.click()
    sleep(wait)


    The error I get:



    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)


    The "other element" , "wz-title" is basically an angular wizard template I am using. It is used by my app in other screens too, and I have no problem clicking on buttons, so the issue is with this toggle switch (which ionic implements as a checkbox)



    Alternate approach that I tried and failed:



    def tap_item(self,id,wait=5):
    print ('Tapping item: '.format(id))
    element = self.driver.find_element_by_id(id)
    #self.driver.execute_script("arguments[0]).click();", element);
    self.driver.execute_script("document.getElementById(arguments[0]).click();", id);


    There is no error here, but it doesn't activate



    Any help would be appreciated.



    Given this is a web app, I can't really get any location. Tap doesn't work because the method is not implemented for a WebView










    share|improve this question


























      0












      0








      0








      I am unable to activate an <ion-toggle> button using appium/python client.



      Here is the HTML template:



      <ion-toggle id="testaut_useauth_toggle" 
      ng-change="toggleAuth()"
      ng-model="wizard.useauth"
      toggle-class="toggle-calm">'kWizUseAuth'
      </ion-toggle>


      My appium test.py code:



      self.click_item("testaut_useauth_toggle")
      def click_item(self,id, wait=5):
      element = self.driver.find_element_by_id(id)
      element.click()
      sleep(wait)


      The error I get:



      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)


      The "other element" , "wz-title" is basically an angular wizard template I am using. It is used by my app in other screens too, and I have no problem clicking on buttons, so the issue is with this toggle switch (which ionic implements as a checkbox)



      Alternate approach that I tried and failed:



      def tap_item(self,id,wait=5):
      print ('Tapping item: '.format(id))
      element = self.driver.find_element_by_id(id)
      #self.driver.execute_script("arguments[0]).click();", element);
      self.driver.execute_script("document.getElementById(arguments[0]).click();", id);


      There is no error here, but it doesn't activate



      Any help would be appreciated.



      Given this is a web app, I can't really get any location. Tap doesn't work because the method is not implemented for a WebView










      share|improve this question
















      I am unable to activate an <ion-toggle> button using appium/python client.



      Here is the HTML template:



      <ion-toggle id="testaut_useauth_toggle" 
      ng-change="toggleAuth()"
      ng-model="wizard.useauth"
      toggle-class="toggle-calm">'kWizUseAuth'
      </ion-toggle>


      My appium test.py code:



      self.click_item("testaut_useauth_toggle")
      def click_item(self,id, wait=5):
      element = self.driver.find_element_by_id(id)
      element.click()
      sleep(wait)


      The error I get:



      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)


      The "other element" , "wz-title" is basically an angular wizard template I am using. It is used by my app in other screens too, and I have no problem clicking on buttons, so the issue is with this toggle switch (which ionic implements as a checkbox)



      Alternate approach that I tried and failed:



      def tap_item(self,id,wait=5):
      print ('Tapping item: '.format(id))
      element = self.driver.find_element_by_id(id)
      #self.driver.execute_script("arguments[0]).click();", element);
      self.driver.execute_script("document.getElementById(arguments[0]).click();", id);


      There is no error here, but it doesn't activate



      Any help would be appreciated.



      Given this is a web app, I can't really get any location. Tap doesn't work because the method is not implemented for a WebView







      ionic-framework appium appium-android






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 7 at 21:53







      user1361529

















      asked Mar 7 at 20:24









      user1361529user1361529

      9641231




      9641231






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Found a solution after looking into how the <ion-toggle> button has been implemented and with some experimentation on which item should 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)


          Also cross posted at https://github.com/appium/python-client/issues/340






          share|improve this answer






















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55052248%2fclicking-on-an-ion-toggle-using-appium%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Found a solution after looking into how the <ion-toggle> button has been implemented and with some experimentation on which item should 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)


            Also cross posted at https://github.com/appium/python-client/issues/340






            share|improve this answer



























              0














              Found a solution after looking into how the <ion-toggle> button has been implemented and with some experimentation on which item should 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)


              Also cross posted at https://github.com/appium/python-client/issues/340






              share|improve this answer

























                0












                0








                0







                Found a solution after looking into how the <ion-toggle> button has been implemented and with some experimentation on which item should 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)


                Also cross posted at https://github.com/appium/python-client/issues/340






                share|improve this answer













                Found a solution after looking into how the <ion-toggle> button has been implemented and with some experimentation on which item should 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)


                Also cross posted at https://github.com/appium/python-client/issues/340







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 8 at 14:33









                user1361529user1361529

                9641231




                9641231





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55052248%2fclicking-on-an-ion-toggle-using-appium%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

                    Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

                    2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived