I need to click on 'homebutton' button of a angular website through typescript in protractor and after clicking need to check that i am on homepage of the website. can anybody tell me this?

  • 2
    Hi Anju, Welcome to SQA. In order to get good answers, please elaborate your question. Have you tried anything from your end? If so, where are you getting stuck. – demouser123 Sep 24 '18 at 3:43
  • What have you tried so far? Please share your code. – Vishal Aggarwal Oct 31 '18 at 1:55

You can use various Protractor locators to find the home button and perform click action on it. You can then use an expect to verify that you are back on the home page.

Checkout this site for examples.

I could give you the code here but then I won't be helping you become a good automation engineer.

  • As i know this is the very basic thing we normally do in our script,i forgot to mention here or i say i couldn't write here the thing on which i was stuck that day, actually i have started working on Protractor and typescript and till now i worked on Selenium , So that day there was some issue related to npm not actually with the scripts and locators, so yeah that day only i ended up with successfull execution of my whole script. By the way thanks – Anju rawat Oct 2 '18 at 10:48

Without seeing your code , it is difficult to provide a solution to your specific problem.

However, in general, Cucumber framework has implementations in multiple languages including javascript/Typescript as cucumberJS, so effectively Protractor and cucumber can be combined. In fact, it is a solid combo although most people use Protractor with Jasmine(another BDD framework) as jasmine assertions can resolve Protractor promises natively.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.