Ugh
As far I know, using CSS selector to select based on the element text is not possible [1]. But the good news is that you can do it with xpath. Example:
//a[text()="Add Item"]
Please note: The selector is untested and may contain errors.
The Firefox extensions: Firebug and Firepath are great tools to validate the selectors.
-Tatu
Send from my mobile
[1] http://www.w3.org/TR/CSS21/selector.html
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
No problem. Just mentioned that as there are a lot of great people in the forum that can give great advice to problems. Details and error outputs help us to help you. I've too have been getting familiar with AngularJS. I am thinking that we could vreate a simple exercise/demo that follows along with the tutorial on https://docs.angularjs.org/tutorial.
Ed
On 03/26/2015 01:23 AM, N.T. wrote:
Hi Ed,
First of all I apologize for not giving so much information.
So here's the issue, in case anyone gets this error again.
After the user clicks the link "Add item" a hidden element will appear which is the link to the cart called "View Cart"
There are two keywords that are involved, which is the keyword to ADD the item to the shopping cart, and the keyword to proceed to check out with the items.
Add item to cartClick Element css=.product_listing_compact article aClick Element css=.size_selector .product_size_list a:not(.unavailable)Click Link xpath=//a[contains(text(),'Add Item')]Wait Until Page Contains Element xpath=//a[contains(text(),'View Cart')] 30 secondsComment Page Should Contain Link xpath=//a[contains(text(),'View Cart')]
Proceed to CheckoutClick Element xpath=//a[contains(text(),'View Cart')]Page Should Contain Element id=cart_idClick Link id=checkout_button
These keywords run in sequence, and the reason why I'm so confused is why is it that despite that the "Add Item to cart" keyword passes (since IN the log it confirms that the link is there)
So I looked again at the log: