Posts

Showing posts with the label Basic UNIX Commands

Handle custom tags using WebDriver

Sometime while doing automation we have to identify the element which have custom tags like <g> <svg> etc. For this we normally use * that will identify all elements tags in case we have to identify only specified custom tag then we can use below example for this. < svg height = "600" width = "910" xmlns : xlink = "http://www.w3.org/1999/xlink" id = "svgcontent" overflow = "visible" x = "910" y = "600" viewBox = "0 0 910 600" > < g style = "pointer-events:all" > < text fill = "rgb(0,0,0)" font - family = "Sans-Serif" font - size = "13" id = "80-155-126" transform = "rotate(-90, 168, 126)" y = "126" x = "168" style = " pointer - events : inherit "> A100A </ text > </ g > </ svg > Following Xpath will work here ...

Basic UNIX Commands

Directory :: Show current directory pwd Show content of directory ls -al Changing directory cd <newdir> Creating directory mkdir <dir> Deleting directory if empty rmdir <dir> Deleting directory if full rm -r <dir> Moving directory mv <olddir> <newdir> Copy directory cp -r <olddir> <newdir> Files :: Show file entry ls -al <file> Delete file rm -i <file> Move file mv <file> <path> Copy file cp <file> <newfile> Rename file mv <oldfile> <newfile> Show file content at once cat <file> Show file content page wise more <file> Show file with long lines cat <file> | fold Show first 20 lines of file head -20 <file> Show last 20 lines of file tail -20 <file> Edit file <editorname> <file> Edit file with vi vi <file> Give all file permissions to yourself chmod 700 <file> The above even into subdirectories chmod -R 700 <dir...