Showing posts with label Drag. Show all posts
Showing posts with label Drag. Show all posts

Monday, 20 March 2017

Fancytree Drag and drop of Node

I want to move a node from right tree to left tree. At begin, I try to implement this action by drag_and_drop function. But failed.


Solution : I use click_and_hold, move_to_element, click and release methods to completed this action.

python:
     righttree = driver.find_element_by_xpath(".//*[@id='right']/ul/li[1]/span/span[3]")

     target = driver.find_element_by_xpath(".//*[@id='left']/ul/li[1]/span")

     actions = ActionChains(driver)
     actions.click_and_hold(righttree)
     actions.move_to_element(target)
     actions.click(target)
     actions.release()
     actions.perform()
     WebDriverWait(driver, 10).until(
       (EC.element_to_be_clickable((By.XPATH, ".//*[@id='left']/ul/li[1]/ul/li/span/span[3]"))))
time.sleep(2)









Thursday, 16 March 2017

Fancytree Drag and drop of Node outside a frame



Fancytree Drag and drop of Node outside a frame     
 I cannot drop item outside of tree





By default draggable node in tree create in parent component, if you want drag to other frames you should specify you'r parent component appendTo: "body" For my it's work:
     dnd: {
        draggable: {
            zIndex: 1000,
            scroll: false,
            revert: "invalid",
            appendTo: "body"
        },
 }


how-to-recursively-create-subfolder-in-each-folder-of-a-directory-in-cmd

test.cmd: @echo off setlocal for /f "usebackq tokens=*" %%a in (`dir /b /a:d`) do ( rem enter the directory pushd %%a echo...