o
    i                     @   s4   d dl mZ d dlmZ ddlmZmZ dd ZdS )    )By)Keys   )shiftcmdtrlc                    s   j } fdd} jddd |d  d}|d jdks#J  jddd |  t j tj  d}|d jd	ksBJ  jd
d  jddd |  t	 j tj  d}|d jdksgJ  jddd |   j 
tjd   d}|d jdksJ  jddd  jd
dd |  |d  d} d
g ksJ |  |d  d
}|d jdksJ d S )Nc                      s    j dS )Nz$Jupyter.notebook.clear_all_output();)browserexecute_script notebookr	   d/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/notebook/tests/selenium/test_execute_code.pyclear_outputs	   s   z(test_execute_code.<locals>.clear_outputsr   za=10; print(a))indexcontentz'Jupyter.notebook.get_cell(0).execute();10za=11; print(a)11r   )r   za=12; print(a)12za=13; print(a)zGbutton[data-jupyter-action='jupyter-notebook:run-cell-and-select-next']13zraise IOErrorza=14; print(a)z
        var cell0 = Jupyter.notebook.get_cell(0);
        var cell1 = Jupyter.notebook.get_cell(1);
        cell0.execute();
        cell1.execute();
    z
            var cell0 = Jupyter.notebook.get_cell(0);
            var cell1 = Jupyter.notebook.get_cell(1);
            cell0.execute(false);
            cell1.execute();
        14)r   	edit_cellr   wait_for_cell_outputtextr   r   ENTERdelete_cellr   find_elementr   CSS_SELECTORclickget_cell_output)r   r   r   outputsr	   r
   r   test_execute_code   sH   








r   N)selenium.webdriver.common.byr   selenium.webdriver.common.keysr   utilsr   r   r   r	   r	   r	   r   <module>   s    