The following test case was discussed at Cigniti company technical interview question:
solution:------------
- 1. open flipkart.com
- 2.select electronics in that click on laptops.
- 3.In Laptops brands select HP
- .4.select checkbox 30000-40000
- 5. list of Laptops copy to excel sheet( without using Data table).
- 6.select first Laptop and buy it.
solution:------------
import java.io.FileOutputStream; import java.io.WriteAbortedException; import java.util.ArrayList; import java.util.List; import jxl.Sheet; import jxl.Workbook; import jxl.write.Label; import jxl.write.WritableSheet; import jxl.write.WritableWorkbook; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.support.ui.Select; import org.testng.annotations.Test; import org.testng.annotations.BeforeTest; import org.testng.annotations.AfterTest; import com.thoughtworks.selenium.Selenium; public class flipkart_lappy { public WebDriver driver; public Selenium selenium; String str1; @Testpublic void lappy() throws Exception{ FileOutputStream fo =new FileOutputStream("E:\\Saritha\\output\\result.xls"); WritableWorkbook wb = Workbook.createWorkbook(fo); WritableSheet ws = wb.createSheet("Sheet1", 0); driver.findElement(By.xpath(".//*[@id='fk-mainhead-id']/div[2]/div/div[1]/ul/li[1]/a/span")).click(); Thread.sleep(1000); driver.findElement(By.linkText("Laptops")).click(); Thread.sleep(1000);driver.findElement(By.linkText("HP")).click(); Thread.sleep(1000);driver.findElement(By.xpath("//*[@id='price_range']/li[4]/a/input")).click(); Thread.sleep(1000);//adding input from excel sheet. String str1= driver.findElement(By.xpath(".//*[@id='browse-results-area']/div[6]")).getText(); System.out.println("str1");String s[] = str1.split("\n"); System.out.println(s.length); for (int i = 0; i < s.length; i++) { if (s[i].contains("HP")) { System.out.println(s[i]); } Label res =new Label(0, i, s[i]); ws.addCell(res); } wb.write(); wb.close(); driver.findElement(By.xpath("//*[@id='products']/div[1]/div[1]/div/div[1]/a")).click(); ArrayListtry to excute itwindow =new ArrayList (driver.getWindowHandles()); driver.switchTo().window(window.get(0)); Thread.sleep(1000); driver.findElement(By.xpath("//*[@id='mprod-buy-btn']/form/input[3]")).click(); } @BeforeTest public void beforeTest() { driver =new FirefoxDriver(); driver.get("http://www.flipkart.com/"); driver.manage().window().maximize();} @AfterTestpublic void afterTest() { driver.quit();} }
Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.
ReplyDeleteHadoop Training Institute In chennai
This is very good content you share on this blog. it's very informative and provide me future related information.
ReplyDeletepython training in chennai | python training in bangalore
python online training | python training in pune
python training in chennai | python training in bangalore
python training in tambaram | python training in velachery
I am sure this post has helped me save many hours of browsing other related posts just to find what I was looking for. Many thanks!
ReplyDeletejava training in omr
java training in annanagar | java training in chennai
java training in marathahalli | java training in btm layout
java training in rajaji nagar | java training in jayanagar
Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.
ReplyDeleterpa training in Chennai | rpa training in velachery
rpa training in tambaram | rpa training in sholinganallur
rpa training in Chennai | rpa training in pune
rpa online training | rpa training in bangalore
This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
ReplyDeletepython training in annanagar
python training in chennai
python training in chennai
python training in Bangalore
Wonderful post. Thanks for taking time to share this information with us.
ReplyDeleteRPA Training in Chennai
RPA courses in Chennai
Robotic Process Automation Training
DevOps Training in Chennai
AWS Training in Chennai
Angularjs Training in Chennai
Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.
ReplyDeleteBest Selenium Training in Chennai | Selenium Training Institute in Chennai | Besant Technologies
Selenium Training in Bangalore | Best Selenium Training in Bangalore
AWS Training in Bangalore | Amazon Web Services Training in Bangalore
Useful post, thanks for taking time to share this page.
ReplyDeletePython course in Chennai
Python Classes in Chennai
Python Training
Python Training Institute in Chennai
Best Python Training in Chennai
Python Training in Velachery
I was curious if you ever considered changing the layout of your site? It’s very well written; I love what you’ve got to say. But maybe you could a little more in the way of content so people could connect with it better.
ReplyDeleteindustrial safety courses in chennai
Interesting Post. I liked your style of writing. It is very unique. Thanks for Posting.
ReplyDeleteNode JS Training in Chennai
Node JS Course in Chennai
Node JS Advanced Training
Node JS Training Institute in chennai
Node JS Training Institutes in chennai
Node JS Course
ReplyDeleteThe information which you shared is very much intresting. Thanks for sharing the amazing blog.
Web Designing Course in Coimbatore
Web Design Training in Coimbatore
Web Designing Training Institute in Coimbatore
Web Design Training Coimbatore
Best Web Designing Institute in Coimbatore
Hope your article will definitely reach more visitors who want info on recent updates.
ReplyDeleteSelenium Training in Chennai
Best Selenium Training Institute in Chennai
ios developer training in chennai
Digital Marketing Training in Chennai
PHP Course Chennai
php course
Nice post. I learned some new information. Thanks for sharing.
ReplyDeleteendtoendhrsolutions
Technology
Great post, this is awesome and very creativity content. I really impressed. I want more updates.......
ReplyDeleteCCNA Institute in Bangalore
CCNA Training Center in Bangalore
Best CCNA Training Institute in Bangalore
CCNA Training in Tnagar
CCNA Course in Vadapalani
CCNA Training in Nungambakkam
Your blog is nice. I believe this will surely help the readers who are really in need of this vital piece of information. Thanks for sharing and kindly keep updating.
ReplyDeleteEnglish Speaking Course in Bangalore
Best Spoken English Classes in Bangalore
Spoken English in Bangalore
Best Spoken English Training Center near me
Spoken English Institute in Chennai
English Coaching Classes in Chennai
Best Spoken English Class in Chennai
It is very excellent blog and useful article thank you for sharing with us, keep posting.
ReplyDeletePrimavera Training
Primavera p6 Training
Primavera Training Institute in Chennai
Primavera Training Institutes in Chennai
Nice post. I learned some new information. Thanks for sharing.
ReplyDeleteXamarin Training in Chennai
Xamarin Course in Chennai
Xamarin Training
Xamarin Course
Xamarin Training Course
Xamarin Classes
Best Xamarin Course
Innovative thinking of you in this blog makes me very useful to learn.i need more info to learn so kindly update it.
ReplyDeleteSalesforce Training in chennai
Salesforce Training in Anna Nagar
Salesforce Training Institutes in Vadapalani
Salesforce Training in T nagar
Nice post. By reading your blog, I get inspired .. Thank you for posting.
ReplyDeleteInformatica Training chennai
Informatica Training institutes in Chennai
Best Informatica Training Institute In Chennai
Best Informatica Training center In Chennai
Informatica institutes in Chennai
Informatica courses in Chennai
Informatica course
Informatica MDM Training in Chennai
The blog which you have posted is outstanding. Thanks for your Sharing.
ReplyDeleteEthical Hacking Course in Coimbatore
Hacking Course in Coimbatore
Ethical Hacking Training in Coimbatore
Ethical HackingTraining Institute in Coimbatore
Ethical Hacking Training
You have explained the topic very clearly. I really appreciate your work here.
ReplyDeleteSpark Training Academy Chennai
Apache Spark Training
Spark Training Institute in Adyar
Spark Training Institute in Velachery
Spark Training Institute in Tambaram
Informative post,It is useful for me to clear my doubts.I hope others also like the information you gave in your blog.
ReplyDeletegerman language classes in bangalore
learn german in bangalore
German Training in Mogappair
German Training in Nungambakkam
Hi,
ReplyDeleteI must appreciate you for providing such a valuable content for us. This is one amazing piece of article. Helped a lot in increasing my knowledge.
Android Training Chennai
Android Courses in Chennai
Android Mobile apps Development Training in Chennai
AWS Training in Chennai
AWS Training
AWS Course in Chennai
Awesome Post . You way of expressing things makes reading very enjoyable. Thanks for posting.
ReplyDeleteEthical Hacking Course in Chennai
Hacking Course in Chennai
Ethical Hacking Training in Chennai
Certified Ethical Hacking Course in Chennai
Ethical Hacking Course
Ethical Hacking Certification
IELTS coaching in Chennai
IELTS Training in Chennai
You are an awesome writer. The way you deliver is exquisite. Pls keep up your work.
ReplyDeleteSpoken English Classes in Chennai
Best Spoken English Classes in Chennai
Spoken English Class in Chennai
Spoken English in Chennai
Best Spoken English Class in Chennai
English Coaching Classes in Chennai
Best Spoken English Institute in Chennai
At this time, it seems like Word Press is the preferred blogging platform available right now.
ReplyDeleteoccupational health and safety course in chennai
Your way of writing nice
ReplyDeletebest php training in chennai
Very good brief and this post helped me alot. Say thank you I searching for your facts. Thanks for sharing with us!
ReplyDeletedevops online training
aws online training
data science with python online training
data science online training
rpa online training
I'm here representing the visitors and readers of your own website say many thanks for many remarkable
ReplyDeleteMicrosoft Azure online training
Selenium online training
Java online training
uipath online training
Python online training
Good Job. You have an in-depth knowledge. The way of sharing is very unique.
ReplyDeleteInformatica Training in Chennai
Informatica Training Center Chennai
Best Informatica Training Institute In Chennai
Best Informatica Training center In Chennai
Informatica institutes in Chennai
Informatica courses in Chennai
Informatica Training
Informatica Training in Tambaram
Informatica Training in Adyar
Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing.salesforce training in chennai
ReplyDeletesoftware testing training in chennai
robotic process automation rpa training in chennai
blockchain training in chennai
devops training in chennai
Amazing! This blog looks just like my old one!
ReplyDeleteIt’s on a completely different subject but it has pretty much
the same layout and design. Wonderful choice
of colors!
Java Training in Chennai
Java Course in Chennai
No.1 AWS Training Institute in Chennai | Infycle Technologies
ReplyDeleteDescription:
Study Amazon Web Services for making your career as a shining sun with Infycle Technologies. Infycle Technologies is the best AWS training institute in Chennai, providing complete hands-on practical training of professional specialists in the field. In addition to that, it also offers numerous programming language tutors in the software industry such as Oracle, Python, Big Dat, Hadoop, etc. Once after the training, interviews will be arranged for the candidates, so that, they can set their career without any struggle. Of all that, 200% placement assurance will be given here. To have the best career, call 7502633633 to Infycle Technologies and grab a free demo to know more.
Amazon Web Service
Titlle
ReplyDeleteTop AWS Course in Chennai | Infycle Technologies
Description:
Wanna have a good carrier in software fields? Come to Infycle Technologies. We provide the Top AWS training in Chennai. Not only that, we also offer more than 20 software training courses with 100% job assurance. Along with that, we prefer a mock interview session for students, so that they can attend the interview without any fear. For more details dial 7502633633
ReplyDeleteTitle:
Get Big Data Certification in Chennai | Infycle Technologies
Description:
Learn Big Data for making your career towards a sky-high with Infycle Technologies. Infycle Technologies is the best Big Data training institute, providing courses for the Big Data certification in Chennai in 200% hands-on practical training with professional trainers in the domain. Apart from the training, the placement interviews will be arranged for the students, so that they can set their career without any struggle. Of all that, 100% placement assurance will be given here. To have the best career, call 7502633633 to Infycle Technologies and grab a free demo to know more.
Best training in Chennai
Infycle Technologies, the best software training institute in Chennai offers the No.1 Data Science training in Chennai for Students, tech professionals, and freshers. In addition to the Data Science Training Course, Infycle also offers other professional courses such as Cyber Security, Python, Oracle, Java, Power BI, Digital Marketing, Big Data, etc., which will be trained with 100% practical classes. After the completion of training, the trainees will be sent for placement interviews in the top MNC's. Call 7502633633 to get more info and a free demo.
ReplyDeleteIf Database is a job that you're dreaming of, then we, Infycle are with you to make your dream into reality. Infycle Technologies offers the best Oracle DBA Training in Chennai, along with various levels of Oracle courses such as Oracle PLSQL, Oracle Hive, etc., in hands-on practical training with professional tutors in the field. The training will be tested by various levels of preparation strategies for the placement and by that the mock interviews will be given for the candidates, so that, they can face the interviews with full confidence. For your enhanced future, call 7502633633 to know more offers and training.
ReplyDeleteBest software training in Chennai