test_basic.robot 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. *** Settings ***
  2. Library Selenium2Library timeout=10 implicit_wait=0.5
  3. Test Setup Open Browser http://localhost:11111/
  4. Test Teardown Close All Browsers
  5. *** Keywords ***
  6. Submit Preferences
  7. Set Selenium Speed 2 seconds
  8. Submit Form id=search_form
  9. Location Should Be http://localhost:11111/
  10. Set Selenium Speed 0 seconds
  11. *** Test Cases ***
  12. Front page
  13. Page Should Contain about
  14. Page Should Contain preferences
  15. 404 page
  16. Go To http://localhost:11111/no-such-page
  17. Page Should Contain Page not found
  18. Page Should Contain Go to search page
  19. About page
  20. Click Element link=about
  21. Page Should Contain Why use searx?
  22. Page Should Contain Element link=search engines
  23. Preferences page
  24. Click Element link=preferences
  25. Page Should Contain Preferences
  26. Page Should Contain Default categories
  27. Page Should Contain Currently used search engines
  28. Page Should Contain dummy dummy
  29. Page Should Contain general dummy
  30. Switch category
  31. Go To http://localhost:11111/preferences
  32. Page Should Contain Checkbox category_general
  33. Page Should Contain Checkbox category_dummy
  34. Click Element xpath=//*[.="general"]
  35. Click Element xpath=//*[.="dummy"]
  36. Submit Preferences
  37. Checkbox Should Not Be Selected category_general
  38. Checkbox Should Be Selected category_dummy
  39. Change language
  40. Page Should Contain about
  41. Page Should Contain preferences
  42. Go To http://localhost:11111/preferences
  43. Select From List locale hu
  44. Submit Preferences
  45. Page Should Contain rólunk
  46. Page Should Contain beállítások
  47. Change method
  48. Page Should Contain about
  49. Page Should Contain preferences
  50. Go To http://localhost:11111/preferences
  51. Select From List method GET
  52. Submit Preferences
  53. Go To http://localhost:11111/preferences
  54. List Selection Should Be method GET
  55. Select From List method POST
  56. Submit Preferences
  57. Go To http://localhost:11111/preferences
  58. List Selection Should Be method POST
  59. Change theme
  60. Page Should Contain about
  61. Page Should Contain preferences
  62. Go To http://localhost:11111/preferences
  63. List Selection Should Be theme legacy
  64. Select From List theme oscar
  65. Submit Preferences
  66. Go To http://localhost:11111/preferences
  67. List Selection Should Be theme oscar
  68. Change safesearch
  69. Page Should Contain about
  70. Page Should Contain preferences
  71. Go To http://localhost:11111/preferences
  72. List Selection Should Be safesearch None
  73. Select From List safesearch Strict
  74. Submit Preferences
  75. Go To http://localhost:11111/preferences
  76. List Selection Should Be safesearch Strict
  77. Change image proxy
  78. Page Should Contain about
  79. Page Should Contain preferences
  80. Go To http://localhost:11111/preferences
  81. List Selection Should Be image_proxy Disabled
  82. Select From List image_proxy Enabled
  83. Submit Preferences
  84. Go To http://localhost:11111/preferences
  85. List Selection Should Be image_proxy Enabled
  86. Change search language
  87. Page Should Contain about
  88. Page Should Contain preferences
  89. Go To http://localhost:11111/preferences
  90. List Selection Should Be language Default language
  91. Select From List language Türkçe - tr-TR
  92. Submit Preferences
  93. Go To http://localhost:11111/preferences
  94. List Selection Should Be language Türkçe - tr-TR
  95. Change autocomplete
  96. Page Should Contain about
  97. Page Should Contain preferences
  98. Go To http://localhost:11111/preferences
  99. List Selection Should Be autocomplete -
  100. Select From List autocomplete google
  101. Submit Preferences
  102. Go To http://localhost:11111/preferences
  103. List Selection Should Be autocomplete google
  104. Change allowed/disabled engines
  105. Page Should Contain about
  106. Page Should Contain preferences
  107. Go To http://localhost:11111/preferences
  108. Page Should Contain Engine name
  109. Element Should Contain xpath=//label[@class="deny"][@for='engine_dummy_dummy_dummy'] Block
  110. Element Should Contain xpath=//label[@class="deny"][@for='engine_general_general_dummy'] Block
  111. Click Element xpath=//label[@class="deny"][@for='engine_general_general_dummy']
  112. Submit Preferences
  113. Page Should Contain about
  114. Page Should Contain preferences
  115. Go To http://localhost:11111/preferences
  116. Page Should Contain Engine name
  117. Element Should Contain xpath=//label[@class="deny"][@for='engine_dummy_dummy_dummy'] Block
  118. Element Should Contain xpath=//label[@class="deny"][@for='engine_general_general_dummy'] \
  119. Block a plugin
  120. Page Should Contain about
  121. Page Should Contain preferences
  122. Go To http://localhost:11111/preferences
  123. List Selection Should Be theme legacy
  124. Select From List theme oscar
  125. Submit Preferences
  126. Go To http://localhost:11111/preferences
  127. List Selection Should Be theme oscar
  128. Page Should Contain Plugins
  129. Click Link Plugins
  130. Checkbox Should Not Be Selected id=plugin_HTTPS_rewrite
  131. Click Element xpath=//label[@for='plugin_HTTPS_rewrite']
  132. Submit Preferences
  133. Go To http://localhost:11111/preferences
  134. Page Should Contain Plugins
  135. Click Link Plugins
  136. Checkbox Should Be Selected id=plugin_HTTPS_rewrite