How to handle browser level notification using Selenium Webdriver

前端 未结 6 2202
Happy的楠姐
Happy的楠姐 2020-12-17 22:03

I am Automating some test cases using Selenium Webdriver and core Java,in chrome browser for one test case on clicking button I am getting browser level notification \'Show

6条回答
  •  忘掉有多难
    2020-12-17 22:47

    As per my understanding,this pop-ups not javascripts one.So selenium won't handle them. Same kinda,authentication popup also there , which we automate via a hack like http://username:password@www.test.com , here giving user name and password in url itself. In your case the way Praveen mentioned you have to create browser profile (FF or chrome ).In chrome, profile can be create via desired cabilities options or chrome options function.

提交回复
热议问题