test_basic.robot 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. *** Test Cases ***
  6. Front page
  7. Page Should Contain about
  8. Page Should Contain preferences
  9. 404 page
  10. Go To http://localhost:11111/no-such-page
  11. Page Should Contain Page not found
  12. Page Should Contain Go to search page
  13. About page
  14. Click Element link=about
  15. Page Should Contain Why use searx?
  16. Page Should Contain Element link=search engines
  17. Preferences page
  18. Click Element link=preferences
  19. Page Should Contain Preferences
  20. Page Should Contain Default categories
  21. Page Should Contain Currently used search engines
  22. Page Should Contain dummy dummy
  23. Page Should Contain general dummy
  24. Switch category
  25. Go To http://localhost:11111/preferences
  26. Page Should Contain Checkbox category_general
  27. Page Should Contain Checkbox category_dummy
  28. Click Element xpath=//*[.="general"]
  29. Click Element xpath=//*[.="dummy"]
  30. Submit Form id=search_form
  31. Location Should Be http://localhost:11111/
  32. Checkbox Should Not Be Selected category_general
  33. Checkbox Should Be Selected category_dummy
  34. Change language
  35. Page Should Contain about
  36. Page Should Contain preferences
  37. Go To http://localhost:11111/preferences
  38. Select From List locale hu
  39. Submit Form id=search_form
  40. Location Should Be http://localhost:11111/
  41. Page Should Contain rólunk
  42. Page Should Contain beállítások
  43. Change method
  44. Page Should Contain about
  45. Page Should Contain preferences
  46. Go To http://localhost:11111/preferences
  47. Select From List method GET
  48. Submit Form id=search_form
  49. Location Should Be http://localhost:11111/
  50. Go To http://localhost:11111/preferences
  51. List Selection Should Be method GET
  52. Select From List method POST
  53. Submit Form id=search_form
  54. Location Should Be http://localhost:11111/
  55. Go To http://localhost:11111/preferences
  56. List Selection Should Be method POST
  57. Change theme
  58. Page Should Contain about
  59. Page Should Contain preferences
  60. Go To http://localhost:11111/preferences
  61. List Selection Should Be theme legacy
  62. Select From List theme oscar
  63. Submit Form id=search_form
  64. Location Should Be http://localhost:11111/
  65. Go To http://localhost:11111/preferences
  66. List Selection Should Be theme oscar
  67. Change safesearch
  68. Page Should Contain about
  69. Page Should Contain preferences
  70. Go To http://localhost:11111/preferences
  71. List Selection Should Be safesearch None
  72. Select From List safesearch Strict
  73. Submit Form id=search_form
  74. Location Should Be http://localhost:11111/
  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 Form id=search_form
  84. Location Should Be http://localhost:11111/
  85. Go To http://localhost:11111/preferences
  86. List Selection Should Be image_proxy Enabled
  87. Change search language
  88. Page Should Contain about
  89. Page Should Contain preferences
  90. Go To http://localhost:11111/preferences
  91. List Selection Should Be language Automatic
  92. Select From List language Turkish (Turkey) - tr_TR
  93. Submit Form id=search_form
  94. Location Should Be http://localhost:11111/
  95. Go To http://localhost:11111/preferences
  96. List Selection Should Be language Turkish (Turkey) - tr_TR
  97. Change autocomplete
  98. Page Should Contain about
  99. Page Should Contain preferences
  100. Go To http://localhost:11111/preferences
  101. List Selection Should Be autocomplete -
  102. Select From List autocomplete google
  103. Submit Form id=search_form
  104. Location Should Be http://localhost:11111/
  105. Go To http://localhost:11111/preferences
  106. List Selection Should Be autocomplete google
  107. Change allowed/disabled engines
  108. Page Should Contain about
  109. Page Should Contain preferences
  110. Go To http://localhost:11111/preferences
  111. Page Should Contain Engine name
  112. Element Should Contain xpath=//label[@class="deny"][@for='engine_dummy_dummy_dummy'] Block
  113. Element Should Contain xpath=//label[@class="deny"][@for='engine_general_general_dummy'] Block
  114. Click Element xpath=//label[@class="deny"][@for='engine_general_general_dummy']
  115. Submit Form id=search_form
  116. Location Should Be http://localhost:11111/
  117. Page Should Contain about
  118. Page Should Contain preferences
  119. Go To http://localhost:11111/preferences
  120. Page Should Contain Engine name
  121. Element Should Contain xpath=//label[@class="deny"][@for='engine_dummy_dummy_dummy'] Block
  122. Element Should Contain xpath=//label[@class="deny"][@for='engine_general_general_dummy'] \
  123. Block a plugin
  124. Page Should Contain about
  125. Page Should Contain preferences
  126. Go To http://localhost:11111/preferences
  127. List Selection Should Be theme legacy
  128. Select From List theme oscar
  129. Submit Form id=search_form
  130. Location Should Be http://localhost:11111/
  131. Go To http://localhost:11111/preferences
  132. List Selection Should Be theme oscar
  133. Page Should Contain Plugins
  134. Click Link Plugins
  135. Checkbox Should Not Be Selected id=plugin_HTTPS_rewrite
  136. Click Element xpath=//label[@for='plugin_HTTPS_rewrite']
  137. Submit Form id=search_form
  138. Location Should Be http://localhost:11111/
  139. Go To http://localhost:11111/preferences
  140. Page Should Contain Plugins
  141. Click Link Plugins
  142. Checkbox Should Be Selected id=plugin_HTTPS_rewrite