Different refresh button in browsers
- This topic has 1 reply, 2 voices, and was last updated 5 years, 2 months ago by
Sergey ZAP.
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
Home › Forums › Ask Expert › Different refresh button in browsers
Hello Guengoha,
There are different ways to address this.
1. If you have a parameter for browser type, you can use it in IF…ELSE block. You need separate objects for each Refresh button – you can scan different browsers using separate apps/views. You script may look like this:
If Datatable.Value(“Browser”)=”ie” then
Application(“Application_IE”).View(“View_IE”).Object(“Refresh”).Click
Elseif Datatable.Value(“Browser”)=”chrome” then
Application(“Application_CHROME”).View(“View_CHROME”).Object(“Refresh”).Click
Elseif Datatable.Value(“Browser”)=”firefox” then
Application(“Application_FIREFOX”).View(“View_FIREFOX”).Object(“Refresh”).Click
end if
2. If you are not using parameter for browser, you can perform simple check if Refresh object exists. You also need separate objects for each browser’s Refresh button.
If Application(“Application_IE”).View(“View_IE”).Object(“Refresh”).Exist(5000,false) then
Application(“Application_IE”).View(“View_IE”).Object(“Refresh”).Click
Elseif Application(“Application_CHROME”).View(“View_CHROME”).Object(“Refresh”).Exist(5000,false) then
Application(“Application_CHROME”).View(“View_CHROME”).Object(“Refresh”).Click
Elseif Application(“Application_FIREFOX”).View(“View_FIREFOX”).Object(“Refresh”).Exist(5000,false) then
Application(“Application_FIREFOX”).View(“View_FIREFOX”).Object(“Refresh”).Click
end if
3. Since most browsers use same key combination for reload (CTRL+R), you can use this code (should work for any browser):
zap.Keyboard.KeyDown zap.Keys.Ctrl
zap.Keyboard.KeyPress zap.Keys.R
zap.Keyboard.KeyUp zap.Keys.Ctrl
Already have an account? Login
Check you SPAM folder if you do not see the email.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |