Can't find elements New User

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

Can't find elements New User

JLin
Hey everyone. I'm trying this product out on a Quick buy feature of a website. For instance when you go to http://www.hannaandersson.com/boys-clothing-sweaters-cardigans/ and if you hover over the first sweater you get a new button that pops up called Quick View. I'm trying to select that button then I want to run tests on that pop-up. I'm having issues finding the element. When I inspect the tile for the seater I find some code:

 <a class="pqv-quickview-btn button is-secondary quickview quickbuy-btn" href="http://www.hannaandersson.com/boys-clothing-sweaters-cardigans/48674.html?dwvar_48674_color=AN8&amp;cgid=boys-clothing-sweaters-cardigans#start=1" title="Skiers Sweater In Cotton &amp; Merino" onclick="gtmAnalytics.submitProductImpressionClick(_analytics_13cc4ad9dba1a2352d799b12c7, this, 'image', 'quickbuy');">
Quick Buy
</a>

I assume this is the code I want. When I try to copy the selector or the XPath the driver doesn't work.I get the error element is not attached to the page document. I've used selenium on pretty basic web pages but nothing this complex. Can someone please help me. I have to get this done today.

--
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/f1a6af38-823f-4aba-bde2-f951024945fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Can't find elements New User

Xiang Dong


What I use is "html>body>div.pt_product-search-result>div.clearfix.pgp-main>div.primary-content.pgp-primary-content>div.search-result-content.pgp-grid.js-product-grid.has-two-across>ul.search-result-items.tiles-container.clearfix.hide-compare>li:nth-of-type(1)>div.product-tile.js-product-tile>div.product-image.pt-image-wrapper.js-product-image>a.pqv-quickview-btn.button.is-secondary.quickview.quickbuy-btn". it works well.  

--david


From: [hidden email] <[hidden email]> on behalf of JLin <[hidden email]>
Sent: Sunday, October 29, 2017 4:46 AM
To: Selenium Users
Subject: [selenium-users] Can't find elements New User
 
Hey everyone. I'm trying this product out on a Quick buy feature of a website. For instance when you go to http://www.hannaandersson.com/boys-clothing-sweaters-cardigans/ and if you hover over the first sweater you get a new button that pops up called Quick View. I'm trying to select that button then I want to run tests on that pop-up. I'm having issues finding the element. When I inspect the tile for the seater I find some code:

 <a class="pqv-quickview-btn button is-secondary quickview quickbuy-btn" href="http://www.hannaandersson.com/boys-clothing-sweaters-cardigans/48674.html?dwvar_48674_color=AN8&amp;cgid=boys-clothing-sweaters-cardigans#start=1" title="Skiers Sweater In Cotton &amp; Merino" onclick="gtmAnalytics.submitProductImpressionClick(_analytics_13cc4ad9dba1a2352d799b12c7, this, 'image', 'quickbuy');">
Quick Buy
</a>

I assume this is the code I want. When I try to copy the selector or the XPath the driver doesn't work.I get the error element is not attached to the page document. I've used selenium on pretty basic web pages but nothing this complex. Can someone please help me. I have to get this done today.

--
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/f1a6af38-823f-4aba-bde2-f951024945fb%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/SINPR03MB22371A9D57D101F4936F01D1903B0%40SINPR03MB2237.apcprd03.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.