yeah, checked that. Can you inject this script using python? Sharing it here. var max = 0; document.getElementsByClassName('inventory_item_price') .forEach(e => {newVal = parseFloat(e.innerText.split('$')[1]); if(max < newVal){ max = newVal; } }); console.log(max); var xpathVal = "//div[normalize-space()='$"+max+"']/following-sibling::button[text()='Add to cart']"; var ele = document.evaluate( xpathVal, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null ).singleNodeValue; ele.click();
Hey Naveen, I really hope you see this comment, you have saved my confidence in the skills i learned as a tester and i managed to get a 60% unbelievable hike recently , completely followed your videos be it automation framework, how to explain the framework, managerial rounds , what to say and what not to, and those interview videos you uploaded of other candidates, simply overwhelming, I am humbled by your idea of sharing away the knowledge in free to others and my life has changed because of you, THANK YOU SIR, GOD BLESS YOU IN ABUNDANCE.
Hi sir myself kanimozhi,I have done my engineering in ECE ,year of passed out 2012 ,since 2012 am working in non it field ..last year I have joined selenium automation course . I would like to join software companies... kindly give some suggestion to get the job ( don't have experience in testing but am having knowledge am willing to do) ... waiting for your positive reply...
Hi Naveen.. I am regular follower of your videos and your content is truly amazing!! These days in lot of good product based interviews they are asking leetcode programs to solve and its difficult to crack them ..Can you please come up with a series on how to understand and solve those leetcode/hacker rank.. Will be helpful for everyone who is taking up coding challenges..
Hi Naveen Sir , Thanks for making very knowledgeable videos' for selenium guys , can you share some knowledge about how we automate import and export of the data in csv or xls file from the application and how to validate those data. Please share some knowledge on this .. Thanks Once Again
Hi everyone, Hope everyone is doing good! My client is asking to write tests for UI comparison with Rest api response But our api response will be huge as days pass we will huge data Please help me in providing guidance, any reference github framework Thanks in advance!
thank you for sharing 3 options and beeing short and on point!
THank you Naveen its always good to freshen up skills at all times
Awesome, Thank you so much sir 🥰🥰 Keep Doing more like this videos 👍👍
Great video. 👍 Looking forward to more automation challenges like this
You are a reason i am interested in testing hats off to you
Thanks Naveen for providing multiple solutions.
I used list comprehension in python to get the max price
yeah, checked that. Can you inject this script using python? Sharing it here. var max = 0;
document.getElementsByClassName('inventory_item_price')
.forEach(e => {newVal = parseFloat(e.innerText.split('$')[1]);
if(max < newVal){
max = newVal;
}
});
console.log(max);
var xpathVal = "//div[normalize-space()='$"+max+"']/following-sibling::button[text()='Add to cart']";
var ele = document.evaluate( xpathVal, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null ).singleNodeValue;
ele.click();
Thanks Naveen, Learnt something new on the JS part of it.
Always worth to watch ur videos Naveen sir, Thank you 🙏
Voice is Awesome 😎
Thank you bro❤ #Happy Rose day 🌹 for caring, loving, sharing knowledge📚
This is really awesome using javascript. Thanks
@Naveen AutomationLabs
Thanks Naveen. 🙏🙏
Great 👍
Thanks Naveen
Awesome Tips and Tricks
Hey Naveen,
I really hope you see this comment, you have saved my confidence in the skills i learned as a tester and i managed to get a 60% unbelievable hike recently , completely followed your videos be it automation framework, how to explain the framework, managerial rounds , what to say and what not to, and those interview videos you uploaded of other candidates, simply overwhelming, I am humbled by your idea of sharing away the knowledge in free to others and my life has changed because of you, THANK YOU SIR, GOD BLESS YOU IN ABUNDANCE.
Many congratulations 🎉🎉 wish you all the best buddy
Thanks Naveen.
Thanks Naveen ,Really helpful
Always welcome
Thanks for making video on this scenario.. It’s very helpful!
Thanks for the JS tip.
Hi Naveen, when is it best to inject javascript code when doing automation? Is it useful when automating a specific use case? Thanks
Hi Naveen, I hope this solution is when user doesnt have sort by price feature in the AUT.
Xpath= //*[contains(text(),’$’)]/text()[last()]
You will directly get the list of values. Replace $ not required.
yes you can use this one to avoid $.
nice one :)
Hi sir myself kanimozhi,I have done my engineering in ECE ,year of passed out 2012 ,since 2012 am working in non it field ..last year I have joined selenium automation course . I would like to join software companies... kindly give some suggestion to get the job ( don't have experience in testing but am having knowledge am willing to do) ... waiting for your positive reply...
semma
Hi Naveen..
I am regular follower of your videos and your content is truly amazing!!
These days in lot of good product based interviews they are asking leetcode programs to solve and its difficult to crack them ..Can you please come up with a series on how to understand and solve those leetcode/hacker rank..
Will be helpful for everyone who is taking up coding challenges..
Using the for loop was the easiest and clean i felt, it was only one iteration
Pls share the Link to download the code
Thanks a lot, Naveen sharing your knowledge. I got to know (normalize-space) XPath.
Hi Naveen Sir , Thanks for making very knowledgeable videos' for selenium guys , can you share some knowledge about how we automate import and export of the data in csv or xls file from the application and how to validate those data. Please share some knowledge on this .. Thanks Once Again
Hi Naveen,
Wil the offices in Bangalore resume work from home soon?
not sure but be safe!
@@naveenautomationlabs👍🏼 😍
Hi everyone,
Hope everyone is doing good!
My client is asking to write tests for UI comparison with Rest api response
But our api response will be huge as days pass we will huge data
Please help me in providing guidance, any reference github framework
Thanks in advance!
nice, the JS Code thing was touch though