Download and Configure Selenium with Eclipse

Download and Configure Selenium with Eclipse 24 min

Installing Selenium and configuring it with Eclipse, Installing Driver classes to work with different browsers, Working with different browser with webdriver interface, Adding the driver classes in the environment variable and working without giving the path in the script

QA Section

Speak Your Mind


M Prabhaharan (mprabhamca@gmail.com)

Hi Facing issue while creating allure report ''' Created on Apr 16, 2020 @author: prabha ''' import pytest @pytest.fixture def smart(): global a,b a = input("Enter variable 1 : ") b = input("Enter variable 2 : ") yield print("-------------------") @pytest.mark.run(order=1) def test_case_add(smart): result = int(a) + int(b) print("the Output is : " +str(result)) @pytest.mark.run(order=4) def test_case_difference(smart): result = int(a) - int(b) print("the Output is : " +str(result)) @pytest.mark.run(after="test_case_difference") def test_case_product(smart): result = int(a) * int(b) print("the Output is : " +str(result)) @pytest.mark.run(order=2) def test_case_div(smart): result = int(a) * int(b) print("the Output is : " +str(result)) ------------------------------------------- Output pydev debugger: starting (pid: 6576) ============================= test session starts ============================= platform win32 -- Python 3.7.6, pytest-5.4.1, py-1.8.1, pluggy-0.13.1 rootdir: C:\Users\prabha\eclipse-workspace\SeleniumTest plugins: allure-pytest-2.8.13 collected 4 items Module14\test_allureDemo.py E INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\_pytest\main.py", line 191, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\_pytest\main.py", line 247, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\hooks.py", line 286, in __call__ INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\manager.py", line 93, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\manager.py", line 87, in INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\_pytest\main.py", line 272, in pytest_runtestloop INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\hooks.py", line 286, in __call__ INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\manager.py", line 93, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\manager.py", line 87, in INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\_pytest\runner.py", line 85, in pytest_runtest_protocol INTERNALERROR> runtestprotocol(item, nextitem=nextitem) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\_pytest\runner.py", line 94, in runtestprotocol INTERNALERROR> rep = call_and_report(item, "setup", log) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\_pytest\runner.py", line 190, in call_and_report INTERNALERROR> hook.pytest_runtest_logreport(report=report) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\hooks.py", line 286, in __call__ INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\manager.py", line 93, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\manager.py", line 87, in INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\pluggy\callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "C:\Users\prabha\.p2\pool\plugins\org.python.pydev.core_7.5.0.202001101138\pysrc\_pydev_runfiles\pydev_runfiles_pytest2.py", line 243, in pytest_runtest_logreport INTERNALERROR> exc = _get_error_contents_from_report(report) INTERNALERROR> File "C:\Users\prabha\.p2\pool\plugins\org.python.pydev.core_7.5.0.202001101138\pysrc\_pydev_runfiles\pydev_runfiles_pytest2.py", line 147, in _get_error_contents_from_report INTERNALERROR> report.toterminal(tw) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\_pytest\reports.py", line 65, in toterminal INTERNALERROR> longrepr.toterminal(out) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\_pytest\_code\code.py", line 962, in toterminal INTERNALERROR> element[0].toterminal(tw) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\_pytest\_code\code.py", line 992, in toterminal INTERNALERROR> entry.toterminal(tw) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\_pytest\_code\code.py", line 1080, in toterminal INTERNALERROR> self._write_entry_lines(tw) INTERNALERROR> File "C:\Users\prabha\AppData\Local\Programs\Python\Python37\lib\site-packages\_pytest\_code\code.py", line 1062, in _write_entry_lines INTERNALERROR> tw._write_source(source_lines, indents) INTERNALERROR> AttributeError: 'TerminalWriter' object has no attribute '_write_source' ======================== 4 warnings, 1 error in 0.40s =========================

Reply