Answer to a question from LinkedIn
https://www.linkedin.com/groups/If-there-is-popup-coming-4285318.S.5942940576692314114?view=&item=5942940576692314114&type=member&gid=4285318&trk=eml-b2_anet_digest-hero-4-hero-disc-disc-0&midToken=AQHTpw42IOK2Ew&fromEmail=fromEmail&ut=3htuvU3cBnrSw1
If you using webdriver, then does not matter if what you see on screen or how long it actually appears
Selenium Webdriver just works on the source of your web page, Since you said it is a pop up, either it is alert msg or a javascript pop up.
It cannot be a alert since it appeard for a fraction of second and withtout user input it goes away, so it must be a Javascipt pop up.
To capture this there are two ways.
First, directly invoke the javascript from selenium and capture it seperately and then use them in your actual scipt
Second, Use any Man in the middle Software such as Fiddler(for asp .net but can be used for jsp as well) and stop the screen when the particular Javascript is called so you can capture it.
https://www.linkedin.com/groups/If-there-is-popup-coming-4285318.S.5942940576692314114?view=&item=5942940576692314114&type=member&gid=4285318&trk=eml-b2_anet_digest-hero-4-hero-disc-disc-0&midToken=AQHTpw42IOK2Ew&fromEmail=fromEmail&ut=3htuvU3cBnrSw1
If you using webdriver, then does not matter if what you see on screen or how long it actually appears
Selenium Webdriver just works on the source of your web page, Since you said it is a pop up, either it is alert msg or a javascript pop up.
It cannot be a alert since it appeard for a fraction of second and withtout user input it goes away, so it must be a Javascipt pop up.
To capture this there are two ways.
First, directly invoke the javascript from selenium and capture it seperately and then use them in your actual scipt
Second, Use any Man in the middle Software such as Fiddler(for asp .net but can be used for jsp as well) and stop the screen when the particular Javascript is called so you can capture it.
No comments:
Post a Comment