Skip to main content

Posts

Showing posts with the label error

Change Default Timeout and Wait Time of Capybara

One of the biggest challenge for automation is handling timeout problem. Most of the time, timeout is 60 seconds but it may sometimes not enough if you have badly designed asynchronous calls or the third party ajax calls. This makes handling timeout more complex. set large enough to tolerate network related problems. For Selenium based automation frameworks, like Capybara, default Webdriver timeout is set to Net::ReadTimeout (Net::ReadTimeout) Changing ReadTimeout If you have timeout problem for Capybara, it gives an error like above. This means that the page is not fully loaded in given timeout period. Even you can see that page is loaded correctly but webdriver wait until the Ajax calls finish. class BufferedIO #:nodoc: internal use only def initialize (io) @io = io @read_timeout = 60 @continue_timeout = nil @debug_output = nil @rbuf = '' end . . . . . def rbuf_fill beg

Selenium Chromedriver Error Message: u'unknown error: unable to discover open pages

If you use selenium webdriver to automate regression test cases, you may have got the following error. Because a bug in chromedriver version 2.3 causes this error. According to Google Dev ., this problem had fixed in version 2.6.  Assigning the chrome driver to driver leads to this error by the line 38, which is self.driver = webdriver.Chrome() . To solve the problem, you need to change the chromedriver version 2.3 in your execution path, like C:\Windows\System32 under Windows, with newer version. You can download chrome driver from googleapis .   Error message may like this: Traceback (most recent call last):   File "D:\workspace\automation_project\run.py", line 32, in <module>     m = Project(browser, server)   File "D:\workspace\automation_project\test_case_imps.py", line 38, in __init__     self.driver = webdriver.Chrome()   File "C:\Python27\lib\site-packages\selenium-2.35.0-py2.7.egg\selenium\webdriver\chrome\webdriver.py", line

Selenium Error "Element is not currently interactable and may not be manipulated"

Selenium webdriver can drive different browsers like as Firefox, Chrome or Internet Explorer. These browsers actually cover the majority of internet users, so testing these browsers possibly covers the 90% of the internet users. However, there is no guaranty that the same automation scripts can work without a failure on these three browsers. For this reason, automation code should be error-prone for the browsers you want to cover. The following error is caught when the test script run for Chrome and Internet Explorer, but surprisingly there is no error for the Firefox. Selenium gives an error like below: Traceback (most recent call last):   File "D:\workspace\sample_project\sample_run.py", line 10, in <module>     m.login()   File "D:\workspace\ sample_project \test_case_imps.py", line 335, in login     driver.find_element_by_id("id_username").clear()   File "C:\Python27\lib\site-packages\selenium-2.35.0-py2.7.egg\selenium\webdriver\r

Selenium Error Message: "Can't load the profile. Profile Dir:..."

Because of an upgrade, I needed to move to new computer and new operation system so I moved my automation code to new system which is from Window 7 to Windows 8. When run the code I got the following error indicating that the Selenium can't load the profile which means that the version of the browser is not supported by the Selenium yet. If you get an error like the following one, you need to find the supported version of the browsers. Traceback (most recent call last):   File "D:\workspace\ automation_project \run_test_cases.py", line 12 4, in <module>     m = Markafoni(browser, server)   File "D:\workspace\ automation_project \test_case.py", line 8 64, in __init__     self.driver = webdriver.Firefox()   File "C:\Python27\lib\site-packages\selenium-2.25.0-py2.7.egg\selenium\webdriver\firefox\webdriver.py", line 51, in __init__     self.binary, timeout),   File "C:\Python27\lib\site-packages\selenium-2.25.0-py2.7.egg\sele

Selenium Assertion Check Fails if There are More Than Four Assertions

As you know that selenium is a open source test automation framework for web application. Since it has many good features and being free make it usable for anyone develops or tests web application. However, if we compare it with well-known, highly cost licensed product selenium has some disadvantages such as, as far as I used it may be the main problem, there is no guaranty if the automation scripts works all the time. Even it works for a run successfully, it may give error after a few seconds of it first run. Therefore to fully utilize it, the drawbacks of  the selenium should be known and the scripts should be redesigned. In this post, I want to explain a selenium experiment about assertion. Last time I have faced an error related assertion check during automating a new form. Error is related to a error message which can not be found by webdriver and it waits for a trigger to next step. However if I run every assertion one by one there is no error and it finished successfully. E

Test Neden Gerekli?

Neler test edilir? Yazılımdan istenilenler yerinde ve yapılmış mı?   ( validation ) Yazılım istenilen işlevleri yerine getiriyor mu?     ( verification ) Yazılım işlevleri yaparken hata veriyor mu?           ( reliability )  Yazılım istenilen hızda yapıyor mu?                      ( performance ) Yazılım istenilen kadar işlev yapabiliyor mu?             ( load ) Yazılım istenilen işlevleri ençok nekadar yapıyor?    ( stress ) Yazılım istenilen kolay yapıyor mu?                          ( usability ) Yazılım istenilen işlevleri güvenli yapıyor mu?        ( security ) Yazılım işlevleri herzaman yapabiliyor mu?        ( compatibility ) Yazılım bir hobi çalışması olmadığı ve vadedilen bir takım işleri; hızlı, güvenilir, kolay, arzu edilen herzaman yerine getirmesi planlarıyla yapıldığından üstte sıralanan özelliklere sahip olması gerekir. “HATA” nedir? İngilizce'de hata denildiğinde bir çok terim kullanılırken Türkçe'de tek bir kelime ile bunu anlatmak zor hatta imkansızdır. Bu yüz