how to click button with SPAN tag in dropdown popup

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

how to click button with SPAN tag in dropdown popup

manasa reddy

Im trying to click on + in no.of passengers dropdown in spicejet website with SPAN tag 

                     <div class="ad-row-right">
                    <span class="pax-add pax-enabled" id="hrefDecAdt">-</span>
                     <span id="spanAudlt">1</span>
                     <span class="pax-add pax-enabled" id="hrefIncAdt">+</span>
                    </div>
My code:

               driver.get("http://spicejet.com/");
driver.findElement(By.xpath("//*[@id='divpaxinfo']")).click();
driver.findElement(By.xpath("//div[@id='divpaxOptions']//div[@class='ad-row-right']//span[@id='hrefIncAdt']")).click();

 getting error Exception in thread "main" org.openqa.selenium.ElementNotVisibleException: element not visible 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/b1e3a77c-2c9d-42e4-8c41-4773f07262d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: how to click button with SPAN tag in dropdown popup

bharathi sriram
if the problem is occurring on the second findElement, I would try with xpath = .//span[@class='c'].click();

On Sun, Jun 3, 2018 at 10:59 PM, manasa reddy <[hidden email]> wrote:

Im trying to click on + in no.of passengers dropdown in spicejet website with SPAN tag 

                     <div class="ad-row-right">
                    <span class="pax-add pax-enabled" id="hrefDecAdt">-</span>
                     <span id="spanAudlt">1</span>
                     <span class="pax-add pax-enabled" id="hrefIncAdt">+</span>
                    </div>
My code:

               driver.get("http://spicejet.com/");
driver.findElement(By.xpath("//*[@id='divpaxinfo']")).click();
driver.findElement(By.xpath("//div[@id='divpaxOptions']//div[@class='ad-row-right']//span[@id='hrefIncAdt']")).click();

 getting error Exception in thread "main" org.openqa.selenium.ElementNotVisibleException: element not visible 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/b1e3a77c-2c9d-42e4-8c41-4773f07262d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks and Best Regards,
Bharathi

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAEwmRzg6Vg1iYsRku%2BWHUUh%2B%3DHk4XoSYkR2JbaKrW1hh8aBRVw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: how to click button with SPAN tag in dropdown popup

srikanth samala
In reply to this post by manasa reddy
Use execute java script to click

On Mon 4 Jun, 2018, 8:26 PM manasa reddy, <[hidden email]> wrote:

Im trying to click on + in no.of passengers dropdown in spicejet website with SPAN tag 

                     <div class="ad-row-right">
                    <span class="pax-add pax-enabled" id="hrefDecAdt">-</span>
                     <span id="spanAudlt">1</span>
                     <span class="pax-add pax-enabled" id="hrefIncAdt">+</span>
                    </div>
My code:

               driver.get("http://spicejet.com/");
driver.findElement(By.xpath("//*[@id='divpaxinfo']")).click();
driver.findElement(By.xpath("//div[@id='divpaxOptions']//div[@class='ad-row-right']//span[@id='hrefIncAdt']")).click();

 getting error Exception in thread "main" org.openqa.selenium.ElementNotVisibleException: element not visible 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/b1e3a77c-2c9d-42e4-8c41-4773f07262d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CALpnBFT4uo%2Bg5ao4CrjQ-%2B%3D-S5ziUFTJ6_A0Uqd-prWs_9AqTw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: how to click button with SPAN tag in dropdown popup

Rajeev Rahi
In reply to this post by manasa reddy
JavaScript is the best option with keeping some wait or page to load

On Mon, Jun 4, 2018, 4:56 PM manasa reddy <[hidden email]> wrote:

Im trying to click on + in no.of passengers dropdown in spicejet website with SPAN tag 

                     <div class="ad-row-right">
                    <span class="pax-add pax-enabled" id="hrefDecAdt">-</span>
                     <span id="spanAudlt">1</span>
                     <span class="pax-add pax-enabled" id="hrefIncAdt">+</span>
                    </div>
My code:

               driver.get("http://spicejet.com/");
driver.findElement(By.xpath("//*[@id='divpaxinfo']")).click();
driver.findElement(By.xpath("//div[@id='divpaxOptions']//div[@class='ad-row-right']//span[@id='hrefIncAdt']")).click();

 getting error Exception in thread "main" org.openqa.selenium.ElementNotVisibleException: element not visible 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/b1e3a77c-2c9d-42e4-8c41-4773f07262d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAH-THsB%2Bzc3X0XHi4MExYS%2BaVK%2BU7b_b5-pn4vQuesJbDA4Xvw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.