Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
300
4.71k
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 프로토콜 어댑터 개발하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 넥사크로에서 기본적으로 제공하는 데이터 통신 방식은 HTTP 프로토콜을 사용해 요청과 응답을 처리합니다. 이 과정에서 데이터 자체를 변환하지는 않습니다. 하지만 사용 환경에 따라 데이터를 암호화하거나 특정 형식의 데이터를 수신하고 변환하는 과정이 필요할 수 있습니다. 프로토콜 어댑터를 사용하면 간단한 설정만으로 데이터를 암호화하거나 데이터 구조를 변환해 원하는 동작을 구현할 수 있습니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 프로토콜 어댑터 모듈 만들고 앱에서 사용하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 프로토콜 어댑터를 사용하기 위해서는 넥사크로 모듈 디벨로퍼에서 모듈을 만들고 넥사크로 스튜디오에 작성된 모듈을 등록하고 프로토콜, 서비스를 추가해야 합니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 프로토콜 어댑터 모듈 만들고 앱에서 사용하기 프로토콜 어댑터 모듈 만들기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 단계 1. 넥사크로 모듈 디벨로퍼에서 새로운 프로젝트를 만듭니다. 메뉴에서 [File > New > Project]를 선택합니다. 단계 2. Project Wizard가 열리면 Module 항목에서 'Protocol Adaptor'를 선택합니다. <ImgTag>응용 개발 가이드|프로토콜 어댑터 개발하기|프로토콜 어댑터 모듈 만들고 앱에서 사용하기|프로토콜 어댑터 모듈 만들기/1.jpg</ImgTag> 단계 3. 프로젝트 ID를 입력하고 [Next] 버튼을 클릭합니다. 단계 4. Object ID를 입력하고 FinalClass 항목을 true로 변경합니다. <ImgTag>응용 개발 가이드|프로토콜 어댑터 개발하기|프로토콜 어댑터 모듈 만들고 앱에서 사용하기|프로토콜 어댑터 모듈 만들기/2.jpg</ImgTag> 단계 5. 프로젝트가 생성되고 basicPtAdp.js 파일이 편집창에 표시됩니다. <ImgTag>응용 개발 가이드|프로토콜 어댑터 개발하기|프로토콜 어댑터 모듈 만들고 앱에서 사용하기|프로토콜 어댑터 모듈 만들기/3.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 프로토콜 어댑터 모듈 만들고 앱에서 사용하기 프로토콜 어댑터 모듈 편집하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 프로토콜 어댑터 모듈을 새로 만들면 기본적으로 4개의 함수가 생성됩니다. <ImgTag>응용 개발 가이드|프로토콜 어댑터 개발하기|프로토콜 어댑터 모듈 만들고 앱에서 사용하기|프로토콜 어댑터 모듈 편집하기/1.png</ImgTag> initialize <CodeTag> nexacro.basicPtAdp.prototype.initialize = function() { trace('basicPtAdp initialize');}; </CodeTag> 외부 플러그인 모듈을 사용한 경우에는 아래와 같이 PluginElement를 사용해 초기화합니다. <CodeTag> nexacro.basicPtAdp.prototype.initialize = function() { this._plugin = new nexacro.PluginElement(); this._plugin.setElementClassId('Microsoft.XMLDOM'); //this._plugin.setElementClassId('{7E9FDB80-5316-11D4-B02C-00C04F0CD404}'); this._plugin.create(); }; </CodeTag> finalize <CodeTag> nexacro.basicPtAdp.prototype.finalize = function() { trace('basicPtAdp finalize');}; </CodeTag> initialize 함수에서 생성한 외부 모듈을 삭제 처리합니다. <CodeTag> nexacro.basicPtAdp.prototype.finalize = function(){ this._plugin.destroy(); delete this._plugin; } </CodeTag> encrypt 전송할 데이터를 변환하고 return 하는 문자열 변수에 담아서 처리합니다. <CodeTag> nexacro.basicPtAdp.prototype.encrypt = function(strUrl, strData) { trace('encrypt url=' + strUrl + ';data=' + strData); return strData;}; </CodeTag> decrypt 응답으로 받은 데이터를 변환하고 호출한 앱에 전달합니다. <CodeTag> nexacro.basicPtAdp.prototype.decrypt = function(strUrl, strData) { trace('decrypt url=' + strUrl + ';data=' + strData); return strData;} </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 프로토콜 어댑터 모듈 만들고 앱에서 사용하기 프로토콜 어댑터 모듈 배포하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 단계 1. 넥사크로 모듈 디벨로퍼 메뉴[Deploy > Module Package]를 선택하고 Deploy Wizard를 실행합니다. 단계 2. Module Information에서 Type 항목을 'protocoladaptor'으로 변경합니다. <ImgTag>응용 개발 가이드|프로토콜 어댑터 개발하기|프로토콜 어댑터 모듈 만들고 앱에서 사용하기|프로토콜 어댑터 모듈 배포하기/1.jpg</ImgTag> 단계 3. [Deploy] 버튼을 클릭해 모듈을 배포합니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 프로토콜 어댑터 모듈 만들고 앱에서 사용하기 모듈 설치하고 프로토콜 서비스 등록하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 단계 1. 넥사크로 스튜디오 메뉴[File > Install Module]을 선택하고 Install Module Wizard를 실행합니다. 단계 2. 넥사크로 모듈 디벨로퍼에서 만든 모듈 설치 파일을 선택하고 설치합니다. 노트: 모듈 메타인포 속성 중 registration 속성값이 기본값('deny')으로 설정됐기 때문에 설치될 모듈 목록이 보이지는 않습니다. <ImgTag>응용 개발 가이드|프로토콜 어댑터 개발하기|프로토콜 어댑터 모듈 만들고 앱에서 사용하기|모듈 설치하고 프로토콜 서비스 등록하기/1.jpg</ImgTag> 단계 3. Project Explorer에서 TypeDefinition 항목을 선택하고 컨텍스트 메뉴에서 [Add > Protocol]을 선택합니다. <ImgTag>응용 개발 가이드|프로토콜 어댑터 개발하기|프로토콜 어댑터 모듈 만들고 앱에서 사용하기|모듈 설치하고 프로토콜 서비스 등록하기/2.jpg</ImgTag> 단계 4. New Protocol Wizard에서 Protocol ID와 Prefix ID를 설정합니다. <ImgTag>응용 개발 가이드|프로토콜 어댑터 개발하기|프로토콜 어댑터 모듈 만들고 앱에서 사용하기|모듈 설치하고 프로토콜 서비스 등록하기/3.jpg</ImgTag> 단계 5. [Next] 버튼을 클릭하고 Web Browser 항목을 체크하고 ClassName을 입력합니다. <ImgTag>응용 개발 가이드|프로토콜 어댑터 개발하기|프로토콜 어댑터 모듈 만들고 앱에서 사용하기|모듈 설치하고 프로토콜 서비스 등록하기/4.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 프로토콜 어댑터 모듈 만들고 앱에서 사용하기 프로토콜 어댑터를 통해 서비스 호출하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> transaction 메소드 실행 시 아래와 같이 strURL 파라미터에 프로토콜 어댑터 URL 형식을 적용하면 통신 요청이 바로 서버로 전달되지 않고 프로토콜 어댑터를 거치게 됩니다. <CodeTag> this.Button00_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ this.transaction('srv00', 'basicPtAdp://127.0.0.1:4098/test.xml', '','dsOut=Dataset00','value=a','fnCallback');};this.fnCallback = function(id, code, message){ trace('Error['+code+']:'+message);} </CodeTag> Button 클릭 시 아래와 같은 순서로 프로토콜 어댑터 동작이 처리되는 것을 확인할 수 있습니다. initialize 예제에서는 초기화는 없고 trace 메소드만 실행합니다. encrypt strArgument 파라미터로 전달한 값이 처리되는 것을 확인합니다. decrypt 요청에 대한 응답 데이터를 확인합니다. CallbackFunc 정상 처리 후 콜백 함수가 동작하는 것을 확인합니다. basicPtAdp initialize encrypt url=basicPtAdp://127.0.0.1:8080/test.xml;data=<?xml version='1.0' encoding='UTF-8'?> <Root xmlns='http://www.nexacroplatform.com/platform/dataset'> <Parameters> <Parameter id='value'>b</Parameter> </Parameters> </Root> decrypt url=basicPtAdp://127.0.0.1:8080/test.xml;data=<?xml version='1.0' encoding='utf-8'?> <Root xmlns='http://www.nexacroplatform.com/platform/dataset' ver='5000' > <Parameters> <Parameter id='ErrorCode' type='int'>0</Parameter> <Parameter id='ErrorMsg' type='string'>SUCC</Parameter> </Parameters> <Dataset id='customers'> <ColumnInfo> <Column id='id' type='STRING' size='4'/> ... Error[0]:SAUCC<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 추가로 설정할 수 있는 인터페이스 함수<|eot_id|><|start_header_id|>assistant<|end_header_id|> 프로토콜 어댑터에서는 추가로 설정할 수 있는 인터페이스 함수를 제공합니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 추가로 설정할 수 있는 인터페이스 함수 재정의할 수 있는 인터페이스 함수<|eot_id|><|start_header_id|>assistant<|end_header_id|> 상속받은 nexacro.ProtocolAdp에서 제공하는 함수를 재정의할 수 있습니다. 속성창에서 추가해 사용할 수 있습니다. <ImgTag>응용 개발 가이드|프로토콜 어댑터 개발하기|추가로 설정할 수 있는 인터페이스 함수|재정의할 수 있는 인터페이스 함수/1.jpg</ImgTag> <ImgTag>응용 개발 가이드|프로토콜 어댑터 개발하기|추가로 설정할 수 있는 인터페이스 함수|재정의할 수 있는 인터페이스 함수/1.png</ImgTag> getCommunicationHeaders 함수는 아래와 같이 설정할 수 있습니다. <CodeTag> nexacro.basicPtAdp.prototype.getCommunicationHeaders = function (strUrl){ var ret = nexacro.ProtocolAdp.prototype.getCommunicationHeaders.call(this, strUrl); ret.push({id:'PHPSESSID', value:'298zf09hf012fh2'}); ret.push({id:'csrftoken', value:'u32t4o3tb3gg43'}); return ret;}; </CodeTag> 통신 시 쿠키 정보가 추가로 설정된 것을 확인할 수 있습니다. <ImgTag>응용 개발 가이드|프로토콜 어댑터 개발하기|추가로 설정할 수 있는 인터페이스 함수|재정의할 수 있는 인터페이스 함수/2.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 추가로 설정할 수 있는 인터페이스 함수 메소드로 추가하는 함수<|eot_id|><|start_header_id|>assistant<|end_header_id|> Project Explorer에서 오브젝트를 선택하고 컨텍스트 메뉴에서 Method를 추가해 설정합니다. <ImgTag>응용 개발 가이드|프로토콜 어댑터 개발하기|추가로 설정할 수 있는 인터페이스 함수|메소드로 추가하는 함수/1.jpg</ImgTag> <ImgTag>응용 개발 가이드|프로토콜 어댑터 개발하기|추가로 설정할 수 있는 인터페이스 함수|메소드로 추가하는 함수/1.png</ImgTag> getHTTPHeader, version 함수는 아래와 같이 설정할 수 있습니다. <CodeTag> nexacro.basicPtAdp.prototype.initialize = function() { this._httpheaders = []; this._httpheaders.push({ id: 'Accept', value: 'application/json, text/json, */*'});}; nexacro.basicPtAdp.prototype.version = function (){ return '1.1';}; nexacro.basicPtAdp.prototype.getHTTPHeader = function (){ return this._httpheaders;}; </CodeTag> 통신 시 헤더 Accept 정보가 변경된 것을 확인할 수 있습니다. <ImgTag>응용 개발 가이드|프로토콜 어댑터 개발하기|추가로 설정할 수 있는 인터페이스 함수|메소드로 추가하는 함수/2.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> X-PUSH 앱 개발하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> X-PUSH는 실시간으로 정보나 메시지를 전달할 수 있는 Server push 기술을 사용하는 제품입니다. 넥사크로는 X-PUSH 서버에서 전송하는 메시지를 처리할 수 있는 XPush 오브젝트를 제공합니다. 간단한 설정만으로 메시지를 요청하고 처리할 수 있습니다. 이번 장에서는 넥사크로 스튜디오에서 XPush 오브젝트를 등록하고 메시지를 처리하는 앱을 구현하는 과정을 살펴봅니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 프로젝트에서 사용할 XPush 오브젝트 등록하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> XPush 오브젝트는 기본 오브젝트로 등록되어 있지 않습니다. Project Explorer 창에서 XPush 오브젝트를 등록한 후 사용할 수 있습니다. 단계 1. 메뉴[File > New > Project]를 선택하고 새로운 프로젝트를 생성합니다. 단계 2. Project Explorer 창에서 [TypeDefinition > Objects] 항목을 선택합니다. Module을 추가할 수 있는 창이 나타납니다. 단계 3. Modules 항목에서 [+] 버튼을 클릭합니다. 파일 탐색기가 나타나면 'Push.json' 파일을 선택합니다. <ImgTag>응용 개발 가이드|X-PUSH 앱 개발하기|프로젝트에서 사용할 XPush 오브젝트 등록하기/1.jpg</ImgTag> 단계 4. Modules 목록에 Push.json 항목이 추가된 것을 확인하고 nexacro.XPush 항목 옆에 있는 [+] 버튼을 클릭해 XPush 오브젝트를 Objects 목록에 추가합니다. <ImgTag>응용 개발 가이드|X-PUSH 앱 개발하기|프로젝트에서 사용할 XPush 오브젝트 등록하기/2.jpg</ImgTag> 단계 5. Objects 목록에 XPush 오브젝트가 추가된 것을 확인하고 [OK] 버튼을 클릭해 창을 닫습니다. XPush 오브젝트를 추가하면서 변경된 설정을 반영하기 위해 프로젝트를 새로 로딩합니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 실시간 메시지를 Grid 컴포넌트에 표시하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> XPush 오브젝트를 추가해서 X-PUSH 서버에서 실시간으로 전송되는 메시지를 수신하고 수신된 메시지를 Grid 컴포넌트에 표시합니다. 노트: 실시간 메시지를 수신하기 위해서는 X-PUSH 서버가 동작하고 있으며 메시지 공급자(Message Provider) 서비스가 실행된 상태여야 합니다. 메시지 전송은 run_provider_demo_Push.bat 파일 실행 시 전송하며 실행을 멈출 때까지 계속 전송합니다. 단계 1. 메뉴[File > New > Form]를 선택하고 새로운 Form 화면을 생성합니다. 단계 2. Form 화면에 Grid 컴포넌트와 Dataset 오브젝트를 추가합니다. 단계 3. Dataset Editor에서 Dataset 오브젝트의 컬럼 속성을 아래와 같이 설정하고 Grid 컴포넌트에 바인딩합니다. <ImgTag>응용 개발 가이드|X-PUSH 앱 개발하기|실시간 메시지를 Grid 컴포넌트에 표시하기/1.jpg</ImgTag> 노트: Dataset 오브젝트의 컬럼 속성은 layouturl 속성값으로 지정하는 메시지 레이아웃 XML 파일에 정의된 id 값이 같아야 합니다. <CodeTag> ...<message type='OPDT'> <field id='id' type='string' size='9'/> <field id='content' type='string' size='255'/></message>... </CodeTag> 단계 4. 컴포넌트 툴바에서 XPush 오브젝트를 확인하고 마우스 드래그앤드롭 동작으로 Form 화면에 XPush 오브젝트를 추가합니다. XPush 오브젝트는 Dataset 오브젝트처럼 Invisible Object 영역에 추가됩니다. <ImgTag>응용 개발 가이드|X-PUSH 앱 개발하기|실시간 메시지를 Grid 컴포넌트에 표시하기/2.jpg</ImgTag> 단계 5. XPush 오브젝트를 선택하고 속성창에서 layouturl, iplist 속성값을 지정합니다. layouturl 속성값은 정의된 메시지 레이아웃 XML 파일의 URL값을 지정하거나 로컬 위치의 파일을 지정할 수 있습니다. iplist 속성값은 X-PUSH 서버 IP와 PORT 값을 지정합니다. 주의: iplist 속성값은 TCP 통신(NRE)과 HTTP 통신(웹브라우저) 중 하나를 선택할 수 있습니다. TCP 통신 방식을 지정하는 경우에는 PORT 번호를 10081로 지정합니다. HTTP 통신 방식을 지정하는 경우에는 PORT 번호를 10080으로 지정합니다. NRE와 웹브라우저 모두 서비스해야 하는 경우에는 iplist 속성값에 두 가지 PORT 설정을 모두 지정해야 합니다. iplist='http://localhost:10080, localhost:10081' 단계 6. Form 오브젝트의 onload 이벤트 함수를 아래와 같이 추가합니다. onload 이벤트 함수에서는 X-PUSH 서버에 연결을 시도합니다. <CodeTag> this.Form_Work_onload = function(obj:nexacro.Form,e:nexacro.LoadEventInfo){ this.XPush00.connect('user00', 'password');}; </CodeTag> 단계 7. XPush 오브젝트의 onsuccess 이벤트 함수를 아래와 같이 추가합니다. 연결이 성공한 경우에 메시지 수신을 위해 subscribe 메소드를 실행합니다. 실시간으로 메시지를 수신해서 Dataset 오브젝트에 메시지 데이터를 추가합니다. 추가된 메시지는 Grid 컴포넌트를 통해 표시됩니다. <CodeTag> this.XPush00_onsuccess = function(obj:nexacro.XPush,e:nexacro.XPushEventInfo){ if(e.action == nexacro.XPushAction.AUTH) // 0 { this.XPush00.subscribe('OPDT', 'ALL', this, this.Dataset00, 'append', 'fn_PushCallback'); }};this.fn_PushCallback = function(Row,ChangeColumn,AllColumn,Type,ActionType){ trace(Row,ChangeColumn,AllColumn,Type,ActionType);} </CodeTag> 단계 8. XPush 오브젝트의 onerror 이벤트 함수를 아래와 같이 추가합니다. 연결이 실패한 경우에는 원인을 확인할 수 있습니다. <CodeTag> this.XPush00_onerror = function(obj:nexacro.XPush,e:nexacro.XPushErrorEventInfo){ trace(e.errormsg, e.statuscode);}; </CodeTag> 단계 9. 앱을 실행하면 onload 이벤트 함수 내에서 X-PUSH 서버에 연결하고 전송되는 메시지를 수신하기 시작합니다. 실시간으로 수신된 메시지가 Grid 컴포넌트에 표시되는 것을 확인합니다. <ImgTag>응용 개발 가이드|X-PUSH 앱 개발하기|실시간 메시지를 Grid 컴포넌트에 표시하기/3.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 신뢰성 메시지 처리하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 노트: Form 화면을 생성하고 XPush 오브젝트를 초기화하는 과정은 실시간 메시지를 Grid 컴포넌트에 표시하기와 같습니다. onload 이벤트 함수에서 달라지는 부분부터 설명합니다. 노트: 신뢰성 메시지를 수신하기 위해서는 X-PUSH 서버가 동작하고 있으며 메시지 공급자(Message Provider) 서비스가 실행된 상태여야 합니다. 메시지 전송은 run_provider_demo_Reli.bat 파일 실행 시 하나의 메시지를 전송합니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 신뢰성 메시지 처리하기 신뢰성 메시지 수신을 위해 토픽 등록하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 신뢰성 메시지(Reliable messaging)는 사용자에게 메시지를 전달하는 것을 보장하는 것을 의미합니다. 실시간 메시지는 메시지를 전송하고 사용자가 메시지를 수신했는지 여부를 확인하지 않습니다. 마치 라디오 방송처럼 계속 메시지를 전달하고 사용자가 이를 수신하는 것입니다. 하지만 신뢰성 메시지는 특정 사용자에게 보내는 음성 메시지와 비슷합니다. 메시지를 전송하는 시점에 확인하지 못했더라도 나중에 확인할 수 있도록 보장하는 것입니다. 신뢰성 메시지를 처리하기 위해서는 어떤 사용자가 어떤 메시지를 수신할 것인지 미리 약속되어 있어야 합니다. 토픽 등록하기를 통해 데이터베이스에 관련 정보를 등록합니다. 단계 1. Form 오브젝트의 onload 이벤트 함수를 아래와 같이 추가합니다. onload 이벤트 함수에서는 X-PUSH 서버에 연결을 시도합니다. <CodeTag> this.Form_Work_onload = function(obj:nexacro.Form,e:nexacro.LoadEventInfo){ this.XPush00.connect('user00', 'password');} </CodeTag> 단계 2. XPush 오브젝트의 onsuccess 이벤트 함수를 아래와 같이 추가합니다. 연결이 성공한 경우에 메시지 수신을 위해 subscribe 메소드를 실행합니다. 실시간으로 메시지를 수신해서 Dataset 오브젝트에 메시지 데이터를 추가합니다. 추가된 메시지는 Grid 컴포넌트를 통해 표시됩니다. <CodeTag> this.XPush00_onsuccess = function(obj:nexacro.XPush,e:nexacro.XPushEventInfo){ if(e.action == nexacro.XPushAction.AUTH) // 0 { this.XPush00.subscribe('NOTI', 'ALL', this, this.Dataset00, 'append', 'fn_PushCallback'); }}; </CodeTag> 단계 3. Form 화면에 Button 컴포넌트를 추가하고 Button 컴포넌트의 onclick 이벤트 함수를 아래와 같이 추가합니다. connect 메소드 실행 시 사용한 userid로 토픽을 등록합니다. 토픽 등록은 한 번만 실행합니다. <CodeTag> this.Button00_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ this.XPush00.registerTopic('NOTI', 'ALL');}; </CodeTag> 단계 4. XPush 오브젝트의 onerror 이벤트 함수를 아래와 같이 추가합니다. 토픽 등록이 실패하거나 이미 등록된 토픽이 있는 경우에는 실패 원인을 확인할 수 있습니다. <CodeTag> this.XPush00_onerror = function(obj:nexacro.XPush,e:nexacro.XPushErrorEventInfo){ trace(e.errormsg, e.statuscode);}; </CodeTag> 단계 5. 토픽이 등록되면 신뢰성 메시지를 수신할 수 있습니다. 데이터베이스 T_TOPIC 테이블에서 등록된 토픽을 확인할 수 있습니다. <ImgTag>응용 개발 가이드|X-PUSH 앱 개발하기|신뢰성 메시지 처리하기|신뢰성 메시지 수신을 위해 토픽 등록하기/1.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 신뢰성 메시지 처리하기 신뢰성 메시지 수신하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 앱이 실행되지 않은 상태에서 메시지가 전송되면 해당 메시지는 데이터베이스 T_USER_MESSAGE 테이블에 저장됩니다. MESSAGE_STATE 컬럼값이 0이면 사용자에게 메시지가 전달되지 않은 상태입니다. <ImgTag>응용 개발 가이드|X-PUSH 앱 개발하기|신뢰성 메시지 처리하기|신뢰성 메시지 수신하기/1.jpg</ImgTag> 단계 1. Form 화면에 Button 컴포넌트를 추가하고 Button 컴포넌트의 onclick 이벤트 함수를 아래와 같이 추가합니다. connect 메소드 실행 시 사용한 userid로 미수신된 메시지가 있는지 확인하고 메시지를 수신합니다. 서버에서 미수신된 메시지를 전송하고 나면 MESSAGE_STATE 컬럼값이 1로 변경됩니다. <CodeTag> this.Button01_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ this.XPush00.requestMessage('NOTI', 'ALL');}; </CodeTag> 단계 2. requestMessage 메소드는 별도의 콜백함수를 지정하지 않고 subscribe 메소드 실행 시 지정한 콜백함수를 사용합니다. requestMessage 메소드를 실행해 미수신된 메시지를 수신하면 sendResponse 메소드를 실행해 해당 메시지 수신에 대한 응답을 보낼 수 있습니다. 서버에서 응답을 수신하면 MESSAGE_STATE 컬럼값이 2로 변경됩니다. <CodeTag> this.fn_PushCallback = function(Row,ChangeColumn,AllColumn,Type,ActionType,MessageId){ trace(Row,ChangeColumn,AllColumn,Type,ActionType,MessageId); if(ActionType=='RELI') this.XPush00.sendResponse(MessageId);} </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 신뢰성 메시지 처리하기 등록된 토픽 취소하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 더 이상 해당 메시지를 수신할 필요가 없다면 등록된 토픽을 취소해주어야 합니다. unregisterTopic 메소드를 사용해 등록된 토픽을 취소할 수 있습니다. 단계 1. Form 화면에 Button 컴포넌트를 추가하고 Button 컴포넌트의 onclick 이벤트 함수를 아래와 같이 추가합니다. connect 메소드 실행 시 사용한 userid로 토픽을 등록한 토픽을 취소합니다. <CodeTag> this.Button02_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ this.XPush00.unregisterTopic('NOTI', 'ALL');}; </CodeTag> 단계 2. 등록된 토픽을 취소하면 신뢰성 메시지를 수신할 수 없습니다. 데이터베이스 T_TOPIC 테이블에서 등록된 토픽 항목 중 ACTIVE 컬럼값이 'N'으로 변경된 것을 확인할 수 있습니다. <ImgTag>응용 개발 가이드|X-PUSH 앱 개발하기|신뢰성 메시지 처리하기|등록된 토픽 취소하기/1.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 위젯 앱 개발하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 위젯은 시계나 CPU 현황 같은 실시간 정보를 모니터링하기 위한 용도로 화면에 항상 띄워놓는 작은 UI 도구입니다. 넥사크로에서는 투명한 레이어를 가지는 새 창을 띄우는 방식으로 위젯 UI를 구현할 수 있습니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 간단한 달력 위젯 만들기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 단계 1. 새로운 프로젝트를 생성합니다. Frameset Template에서 Full 타입을 선택합니다. <ImgTag>응용 개발 가이드|위젯 앱 개발하기|간단한 달력 위젯 만들기/1.jpg</ImgTag> 단계 2. Form_Work 폼에 Button 컴포넌트를 추가하고 아래와 같이 onclick 이벤트 함수를 생성합니다. layered 속성은 ChildFrame 생성 시 배경 윈도우를 투명하게 설정하는 속성입니다. 이 속성값을 true로 설정하면 원하는 모양의 배경 이미지를 화면에 표현할 수 있습니다. <CodeTag> this.Button00_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ nexacro.open('NewWidget', 'FrameBase::WidgetMain1.xfdl', this.getOwnerFrame(), '', 'showontaskbar=false showtitlebar=false showstatusbar=false topmost=true layered=true', 0, 0);}; </CodeTag> WidgetMain1.xfdl 폼은 위젯 형태로 보일 폼입니다. 위젯 형태로 필요한 UI만 노출하기 때문에 OpenStyle 파라미터 설정에서 태스크바나 타이틀바, 상태표시바는 보이지 않게 처리합니다. 그리고 다른 프로그램에 가리지 않도록 topmost 속성값을 true로 지정합니다. 단계 3. WidgetMain1 라는 이름으로 새로운 Form 오브젝트를 생성합니다. 단계 4. ResourceExplorer 탭을 선택하고 컨텍스트 메뉴에서 'Import'를 선택합니다. 배경 이미지로 사용할 투명한 이미지 파일을 가져옵니다. 예를 들어 원 형태의 이미지라면 원 모양만 보여지고 바탕 영역은 투명하게 보여집니다. 예제에서는 아래 이미지를 사용했습니다. https://pixabay.com/en/book-character-glasses-show-1773756/ 단계 5. Form 오브젝트의 background 속성에서 imageurl 속성값으로 투명 이미지 파일을 선택하고 background-color 속성값은 transparent로 설정합니다. <ImgTag>응용 개발 가이드|위젯 앱 개발하기|간단한 달력 위젯 만들기/2.jpg</ImgTag> 단계 6. 투명 이미지 파일에 맞게 Form 오브젝트의 크기를 조정하고 Calendar 컴포넌트를 적절한 위치에 배치합니다. <ImgTag>응용 개발 가이드|위젯 앱 개발하기|간단한 달력 위젯 만들기/3.jpg</ImgTag> 단계 7. 툴바에서 실행옵션으로 NRE를 선택하고 Launch 아이콘을 클릭하거나 단축키 (Ctrl + F5)를 입력하고 앱을 실행합니다. 주의: Launch 실행 시 NRE 이외의 웹브라우저에서는 위젯 기능을 사용할 수 없습니다. 단계 8. 앱에서 버튼을 클릭하면 WidgetMain1 으로 만든 위젯 UI가 화면에 표시됩니다. 단계 9. 투명하지 않은 배경 이미지 영역을 마우스로 드래그하면 원하는 위치로 이동할 수 있습니다. 주의: 투명한 배경 영역 클릭 시에는 뒤에 보여지는 윈도우에 포커스가 이동하기 때문에 마우스로 드래그해서 위젯 위치를 변경할 수 없습니다. 개별 컴포넌트 클릭 시에는 개별 컴포넌트 동작을 해야 하기 때문에 마우스로 드래그해서 위젯 위치를 변경할 수 없습니다. <ImgTag>응용 개발 가이드|위젯 앱 개발하기|간단한 달력 위젯 만들기/4.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 바로 실행되는 위젯 만들기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 이전 예제에서는 메인 폼을 실행하고 버튼 클릭 시 위젯 UI가 나타났습니다. 이번 예제에서는 사용자의 입력 없이 바로 실행되는(것 처럼 보이는) 위젯을 만들어봅니다. 단계 1. 이전 예제에서 사용한 Form_Work 폼에 아래와 같이 oninit 이벤트 함수를 생성합니다. <CodeTag> this.Form_Work_oninit = function(obj:nexacro.Form,e:nexacro.EventInfo){ nexacro.getApplication().mainframe.set_visible(false); nexacro.open('NewWidget', 'FrameBase::WidgetMain1.xfdl', this.getOwnerFrame(), '', 'showontaskbar=false showtitlebar=false showstatusbar=false topmost=true layered=true', 0, 0);}; </CodeTag> 단계 2. 위젯을 종료하기 위한 Button 컴포넌트를 위젯 폼(WidgetMain1)에 추가합니다. 이전 예제에서는 메인 폼을 닫으면 위젯이 같이 종료되는데, 위젯에는 타이틀바가 표시되지 않아서 닫기 버튼을 따로 만들어주어야 합니다. <ImgTag>응용 개발 가이드|위젯 앱 개발하기|바로 실행되는 위젯 만들기/1.jpg</ImgTag> 단계 3. Button 컴포넌트를 추가하고 아래와 같이 onclick 이벤트 함수를 생성합니다. <CodeTag> this.Button00_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ this.close();}; </CodeTag> 단계 4. 툴바에서 실행옵션으로 NRE를 선택하고 Launch 아이콘을 클릭하거나 단축키 (Ctrl + F5)를 입력하고 앱을 실행합니다. 앱이 실행되면서 메인프레임을 보이지 않게 하면서 open 메소드가 실행되기 때문에 위젯 UI만 화면에 표시됩니다. [CLOSE] 버튼을 클릭하면 위젯 UI가 닫힙니다. <ImgTag>응용 개발 가이드|위젯 앱 개발하기|바로 실행되는 위젯 만들기/2.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 트레이에서 위젯 제어하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 위젯이 떠있으면 다른 작업을 할 때 방해가 될 수 있습니다. 그런 경우에는 잠시 위젯을 감추어두었다가 다시 보이도록 할 수 있습니다. 앱에 트레이를 등록하고 트레이에서 위젯을 제어할 수 있습니다. 단계 1. Project Explorer에서 App을 선택하고 컨텍스트 메뉴에서 [Add > Tray] 항목을 선택합니다. <ImgTag>응용 개발 가이드|위젯 앱 개발하기|트레이에서 위젯 제어하기/1.jpg</ImgTag> 단계 2. 트레이 아이콘을 선택하고 속성창에서 icon, tooltip 속성값을 설정합니다. icon: 'application' tooltip: Nexacro Widget Tray 노트: icon 속성값은 기본으로 제공되는 시스템 아이콘을 사용하거나 URL 값을 설정할 수 있습니다. <ImgTag>응용 개발 가이드|위젯 앱 개발하기|트레이에서 위젯 제어하기/2.jpg</ImgTag> 단계 3. onrbuttonup 이벤트 함수를 아래와 같이 추가합니다. 'PopupMenu00'은 다음 단계에서 만들 PopupMenu 컴포넌트 id 값입니다. 트레이에서 마우스 오른쪽 버튼을 클릭했을 때 메뉴가 표시되도록 합니다. <CodeTag> this.Tray0_onrbuttonup = function(obj:nexacro.Tray,e:nexacro.MouseEventInfo){ var pdivWigetMenu = obj.items[obj.findItem('PopupMenu00')]; pdivWigetMenu.trackPopup()}; </CodeTag> 단계 4. 트레이 아이콘 아래에 PopupMenu 창에서 추가하기 버튼을 클릭합니다. <ImgTag>응용 개발 가이드|위젯 앱 개발하기|트레이에서 위젯 제어하기/3.jpg</ImgTag> 단계 5. PopupMenu00 항목을 선택하면 오른쪽 속성창에서 innerdataset을 설정할 수 있습니다. <ImgTag>응용 개발 가이드|위젯 앱 개발하기|트레이에서 위젯 제어하기/4.jpg</ImgTag> captioncolumn, idcolumn 항목은 'Widget', 'Exit'로 지정하고 levelcolumn 항목은 0으로 지정합니다. <ImgTag>응용 개발 가이드|위젯 앱 개발하기|트레이에서 위젯 제어하기/5.jpg</ImgTag> 단계 6. 속성창에서 Event 아이콘을 선택하면 이벤트 함수를 추가할 수 있습니다. onmenuclick 이벤트 함수를 아래와 같이 추가합니다. 트레이에서 오른쪽 마우스 버튼을 클릭해서 메뉴를 표시하고 메뉴 항목을 선택했을 때의 동작을 지정하는 코드입니다. 'Widget' 항목을 선택했을 때 위젯이 닫혀있는(보이지 않는) 경우에는 위젯을 보여주고 이미 위젯이 표시되고 있는 경우에는 로그만 기록합니다. 'Exit' 항목을 선택한 경우에는 앱을 종료합니다. <ImgTag>응용 개발 가이드|위젯 앱 개발하기|트레이에서 위젯 제어하기/6.jpg</ImgTag> <CodeTag> this.Tray0_PopupMenu00_onmenuclick = function(obj:nexacro.TrayPopupMenu,e:nexacro.MenuClickEventInfo){ if(e.id == 'Widget') { var widgetFrame = nexacro.getPopupFrames()['NewWidget']; if(widgetFrame.visible) { trace(widgetFrame); } else { widgetFrame.set_visible(true); } } else if(e.id == 'Exit') { nexacro.getApplication().exit(); }}; </CodeTag> <ImgTag>응용 개발 가이드|위젯 앱 개발하기|트레이에서 위젯 제어하기/7.jpg</ImgTag> 단계 7. 위젯 폼(WidgetMain1)에서 버튼 클릭 시 발생하는 이벤트 스크립트를 수정합니다. 트레이에서 메뉴 선택 시 매번 새로 위젯 화면을 생성하지 않고 visible 속성값만 수정해서 표시 여부만 변경합니다. 그리고 위젯이 닫힐 때 트레이 영역에 메시지를 표시하도록 코드를 추가했습니다. <CodeTag> this.Button00_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ //this.close(); this.parent.set_visible(false); nexacro.getApplication().trays['Tray0'].showBalloonTip('information', 'Info', 'Widget Close');}; </CodeTag> <ImgTag>응용 개발 가이드|위젯 앱 개발하기|트레이에서 위젯 제어하기/8.jpg</ImgTag> 단계 8. 툴바에서 실행옵션으로 NRE를 선택하고 Launch 아이콘을 클릭하거나 단축키 (Ctrl + F5)를 입력하고 윈도우 화면 오른쪽 아래에 트레이가 정상적으로 표시되고 오른쪽 마우스 버튼 클릭 시 메뉴가 표시되는지 확인합니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 윈도우 운영체제 NRE에서 단위 테스트 실행하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> WinAppDriver 연동 기능은 넥사크로에서 제공하는 UIAutomation 인터페이스를 사용해 NRE에서 실행하는 앱의 속성을 읽거나 쓰고 파라미터를 지정해 메소드를 실행하는 것을 지원합니다. 셀레니움 같은 UI 자동화 테스트 도구를 사용해 단위 테스트를 작성하고 테스트할 수 있습니다. 이번 장에서는 WinAppDriver를 설치하고 비주얼 스튜디오와 이클립스에서 기본적인 C#, Java 프로젝트를 생성해 넥사크로 앱에 연결하는 단계를 살펴봅니다. 주의: WinAppDriver는 윈도우 10 이상 환경에서 동작합니다. https://github.com/Microsoft/WinAppDriver#system-requirements<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> WinAppDriver 연동 환경 설정하기 WinAppDriver 설치하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 단계 1. 윈도우 운영체제 [설정 > 개발자 기능 사용]에서 '개발자 모드'를 활성화합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|WinAppDriver 연동 환경 설정하기|WinAppDriver 설치하기/1.jpg</ImgTag> 주의: 해당 모드를 최초 활성화하는 경우에는 운영체제 설정 작업에 약간의 시간이 걸릴 수 있습니다. 시간 여유를 가지고 모드를 활성화해주세요. 단계 2. WinAppDriver 설치 파일(WindowsApplicationDriver.msi)을 내려받습니다. 노트: https://github.com/Microsoft/WinAppDriver https://github.com/Microsoft/WinAppDriver/releases <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|WinAppDriver 연동 환경 설정하기|WinAppDriver 설치하기/2.jpg</ImgTag> 단계 3. 내려받은 설치 파일(WindowsApplicationDriver.msi)을 실행해 WinAppDriver를 설치합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|WinAppDriver 연동 환경 설정하기|WinAppDriver 설치하기/3.jpg</ImgTag> 단계 4. 설치 경로에서 WinAppDriver를 관리자 권한으로 실행합니다. 노트: 일반적인 설치 경로는 아래와 같습니다. C:\Program Files (x86)\Windows Application Driver\ <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|WinAppDriver 연동 환경 설정하기|WinAppDriver 설치하기/4.jpg</ImgTag> 단계 5. 정상적으로 실행이 되는지 확인합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|WinAppDriver 연동 환경 설정하기|WinAppDriver 설치하기/5.jpg</ImgTag> 노트: ip, port 설정을 변경하고자 한다면 아래와 같이 실행합니다. > WinAppDriver.exe [ip] [port]<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> WinAppDriver 연동 환경 설정하기 개발 도구 설치하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> C# 또는 Java 언어를 사용해 단위테스트 프로젝트를 만들 수 있습니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 개발 도구 설치하기 비주얼 스튜디오 설치하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> C# 언어를 사용하고 비주얼 스튜디오를 설치하지 않은 경우 무료로 제공되는 개발 도구를 설치할 수 있습니다. 단계 1. 비주얼 스튜디오 커뮤니티 설치 파일(vs_community__xxxx.xxxx.exe)을 내려받습니다. 노트: Visual Studio Community https://visualstudio.microsoft.com/vs/community/ 단계 2. 내려받은 설치 파일(vs_community__xxxx.xxxx.exe)을 실행해 비주얼 스튜디오를 설치합니다. 주의: 설치 시 필요한 패키지를 내려받는 과정에서 약간의 시간이 걸릴 수 있습니다. 시간 여유를 가지고 설치를 진행해주세요. 단계 3. Workloads 항목에서 'Universal Windows Platform development'를 선택하고 설치를 진행합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|WinAppDriver 연동 환경 설정하기|개발 도구 설치하기/1.jpg</ImgTag> 노트: 개발 환경은 설치 후에도 추가할 수 있습니다. 팁: 실행 시 마이크로소프트 계정 로그인하는 창이 표시되는데, 로그인 없이도 테스트는 해볼 수 있습니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 개발 도구 설치하기 이클립스 설치하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> Java 언어를 사용하고 이클립스를 설치하지 않은 경우 무료로 제공되는 개발 도구를 설치할 수 있습니다. 단계 1. 이클립스 설치 파일(eclipse-inst-win64.exe)을 내려받습니다. 노트: eclipse.org https://www.eclipse.org/downloads/ 단계 2. 내려받은 설치 파일(eclipse-inst-win64.exe)을 실행해 이클립스를 설치합니다. 단계 3. 개발 유형 선택 단계에서는 'Java Developers' 항목을 선택합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|WinAppDriver 연동 환경 설정하기|개발 도구 설치하기/1.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 단위테스트 만들고 실행하기 넥사크로 앱 만들고 배포하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 간단한 넥사크로 앱을 만들고 배포합니다. 팁: 이미 설치한 넥사크로 앱을 사용하려는 경우에는 이 단계는 지나갑니다. 단계 1. 넥사크로 스튜디오를 실행합니다. 단계 2. 프로젝트를 생성하고 간단한 폼 화면을 작성합니다. Button 컴포넌트와 Edit 컴포넌트만 화면에 배치합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|단위테스트 만들고 실행하기|넥사크로 앱 만들고 배포하기/1.jpg</ImgTag> 단계 3. Button 컴포넌트의 onclick 이벤트 함수를 작성합니다. Button 컴포넌트 onclick 이벤트가 발생하면 Edit 컴포넌트에 value 속성값을 변경합니다. <CodeTag> this.Button00_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ this.Edit00.set_value('BUTTON CLICK');}; </CodeTag> 단계 4. 메뉴 [Deploy > Packing (Archive&Update)] 항목을 선택하고 배포할 아카이브 파일을 생성합니다. 서버 연결 없이 실행할 수 있도록 Update Type은 'Local'로 지정합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|단위테스트 만들고 실행하기|넥사크로 앱 만들고 배포하기/2.jpg</ImgTag> 단계 5. [Packing] 버튼을 클릭해 아카이브 파일을 생성되면 [Build App] 버튼을 클릭합니다. 단계 6. Build App 창에서 [Build] 버튼을 클릭해 설치 파일을 생성합니다. 단계 7. 생성한 설치 파일을 실행해 넥사크로 앱을 설치합니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 단위테스트 프로젝트 만들기 비주얼 스튜디오에서 단위테스트 프로젝트 만들기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 단계 1. 비주얼 스튜디오를 실행합니다. 단계 2. 새로운 프로젝트 만들기에서 'Unit Test Project'를 선택하고 새로운 프로젝트를 생성합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|단위테스트 만들고 실행하기|단위테스트 프로젝트 만들기/1.jpg</ImgTag> 단계 3. Appium WebDriver 라이브러리를 설치합니다. 메뉴 [Project > Manage NuGet Package]를 선택하고 검색창에서 'Appium'을 입력해서 검색 결과에서 Appium WebDriver 라이브러리를 확인합니다. [Install] 버튼을 클릭하면 라이브러리를 설치합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|단위테스트 만들고 실행하기|단위테스트 프로젝트 만들기/2.jpg</ImgTag> 단계 4. Updates 탭에서 Selenium 관련 패키지를 확인합니다. 주의: 최신 버전이 설치된 경우에는 코드가 동작하지 않을 수 있습니다. 최신 버전인 경우에는 3.0.1 버전으로 마이너 업데이트해주세요. https://github.com/Microsoft/WinAppDriver/issues/497 <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|단위테스트 만들고 실행하기|단위테스트 프로젝트 만들기/3.jpg</ImgTag> 단계 5. 생성된 C# 소스코드파일을 아래와 같이 수정합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|단위테스트 만들고 실행하기|단위테스트 프로젝트 만들기/4.jpg</ImgTag> 아래 코드에서 넥사크로 앱 관련 설정을 수정합니다. 앱이 설치된 경로, nexacro.exe 실행 파일 경로, nexacro.exe 실행 옵션을 실제 설치 경로에 맞게 수정합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|단위테스트 만들고 실행하기|단위테스트 프로젝트 만들기/1.png</ImgTag> <CodeTag> using System;using System.Threading;using System.Diagnostics;using Microsoft.VisualStudio.TestTools.UnitTesting;using OpenQA.Selenium.Appium.Windows;using OpenQA.Selenium.Remote;namespace UnitTestProject1{ [TestClass] public class NexaTestSession { // winappdriver url protected const string WindowsApplicationDriverUrl = 'http://127.0.0.1:4723/'; // app path private const string NexacroAppDr = 'C:\\Program Files\\TOBESOFT\\Nexacro N\\21\\app0201'; // nexacro.exe path private const string NexacroAppId = 'C:\\Program Files\\TOBESOFT\\Nexacro N\\21\\app0201\\nexacro.exe'; // nexacro.exe argument private const string NexacroAppAg = '-k 'UnitTest' -s 'C:\\Program Files\\TOBESOFT\\Nexacro N\\21\\app0201\\app0201\\start.json''; // search root private const string FindNexacro = 'Root'; // OS/Device private const string TestOs = 'Windows'; private const string TestDevice = 'WindowsPC'; // Session Object : WindowsDriver protected static WindowsDriver<WindowsElement> session; // WinAppDriver Session Create [ClassInitialize] public static void Setup(TestContext context) { // Launch a new instance of nexacro application or find nexacro application } // WinAppDriver Session Delete public static void TearDown() { // Close the application and delete the session if (session != null) { // Close Session – Close Application session.Close(); // Quit Session session.Quit(); // Delete Session session = null; } } [TestMethod] public void Test_Session() { Debug.WriteLine('session:' + session); Debug.WriteLine('session.SessionId:' + session.SessionId); } }} </CodeTag> 단계 6. 넥사크로 앱을 실행하고 세션을 생성하는 코드를 추가합니다. 위의 코드에서 Setup 메소드를 아래와 같이 수정합니다. <CodeTag> // WinAppDriver Session Create[ClassInitialize]public static void Setup(TestContext context){ // Launch a new instance of nexacro application or find nexacro application if (session == null) { // Create a new session to launch nexacro application DesiredCapabilities appCapabilities = new DesiredCapabilities(); TimeSpan time = new TimeSpan(0, 0, 10); // Launch Nexacro appCapabilities.SetCapability('app', NexacroAppId); appCapabilities.SetCapability('appArguments', NexacroAppAg); appCapabilities.SetCapability('appWorkingDir', NexacroAppDr); appCapabilities.SetCapability('platformName', TestOs); appCapabilities.SetCapability('deviceName', TestDevice); // Request Remote WinAppDriver Service session = new WindowsDriver<WindowsElement>(new Uri(WindowsApplicationDriverUrl), appCapabilities, time); // Set implicit timeout to 1.5 seconds to make element search to retry every 500 ms for at most three times session.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(0.5)); Thread.Sleep(TimeSpan.FromSeconds(1.0)); }} </CodeTag> 팁: TimeSpan 설정값에 따라 타임아웃 오류가 발생하는 경우가 있습니다. 그런 경우에는 아래와 같이 설정값을 변경해서 테스트를 진행합니다. TimeSpan time = new TimeSpan(0, 0, 30); 단계 7. 메뉴 [Test > Run > All Tests] 항목을 선택하면 테스트를 진행합니다. 설치한 앱이 실행되는 것을 확인할 수 있습니다. WinAppDriver을 실행한 콘솔 화면에서 접속 정보와 세션이 생성된 것을 확인할 수 있습니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|단위테스트 만들고 실행하기|단위테스트 프로젝트 만들기/5.jpg</ImgTag> 단계 8. 비주얼 스튜디오 테스트 탐색기에서는 성공한 테스트 정보를 확인할 수 있습니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|단위테스트 만들고 실행하기|단위테스트 프로젝트 만들기/6.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 단위테스트 프로젝트 만들기 이클립스에서 단위테스트 프로젝트 만들기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 단계 1. 이클립스를 실행합니다. 단계 2. 메뉴 [File > New > Java Project]를 선택하고 새로운 프로젝트를 생성합니다. 단계 3. 필요한 라이브러리를 내려받습니다. 압축된 파일(.zip)은 압축을 해제합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|단위테스트 만들고 실행하기|단위테스트 프로젝트 만들기/1.png</ImgTag> 노트: Apache Commons Lang 라이브러리는 실행 중 아래와 같은 오류 발생 시 내려받아 설치합니다. 개발 환경에 따라 필요없을 수도 있습니다. java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils 단계 4. JUnit 라이브러리를 추가합니다. 메뉴 [Project > Properties > Java Build Path > Libraries] 탭을 선택하고 [Add Library] 버튼을 클릭합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|단위테스트 만들고 실행하기|단위테스트 프로젝트 만들기/1.jpg</ImgTag> 단계 5. Appium, Selenium 라이브러리를 추가합니다. [Add External JARs] 버튼을 클릭하고 내려받은 라이브러리 파일에서 JAR 파일을 추가합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|단위테스트 만들고 실행하기|단위테스트 프로젝트 만들기/2.jpg</ImgTag> 단계 6. [Apply and Close] 버튼을 클릭해 변경한 내용을 적용합니다. 단계 7. 메뉴 [File > New > Class]를 선택하고 새로운 클래스 파일을 생성합니다. Name 항목만 입력하고 다른 옵션은 수정하지 않습니다. 단계 8. 생성된 Java 소스코드파일을 아래와 같이 수정합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|단위테스트 만들고 실행하기|단위테스트 프로젝트 만들기/3.jpg</ImgTag> 아래 코드에서 넥사크로 앱 관련 설정을 수정합니다. 앱이 설치된 경로, nexacro.exe 실행 파일 경로, nexacro.exe 실행 옵션을 실제 설치 경로에 맞게 수정합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|단위테스트 만들고 실행하기|단위테스트 프로젝트 만들기/2.png</ImgTag> <CodeTag> import org.junit.*;import org.openqa.selenium.remote.DesiredCapabilities;import org.openqa.selenium.remote.RemoteWebElement;import io.appium.java_client.windows.WindowsDriver;import java.util.concurrent.TimeUnit;import java.net.URL;public class UnitTest { // winappdriver url private String WindowsApplicationDriverUrl = 'http://127.0.0.1:4723/'; // app path private String NexacroAppDr = 'C:\\Program Files (x86)\\TOBESOFT\\Nexacro N\\21\\app0201'; // nexacro.exe path private String NexacroAppId = 'C:\\Program Files (x86)\\TOBESOFT\\Nexacro N\\21\\app0201\\nexacro.exe'; // nexacro.exe argument private String NexacroAppAg = '-k 'UnitTest' -s 'C:\\Program Files (x86)\\TOBESOFT\\Nexacro N\\21\\app0201\\app0201\\start.json''; // search root // private String FindNexacro = 'Root'; // OS/Device private String TestOs = 'Windows'; private String TestDevice = 'WindowsPC'; // Session Object : WindowsDriver private static WindowsDriver<RemoteWebElement> session = null; @Before public void setUp() throws Exception { // Launch a new instance of nexacro application or find nexacro application } @After public void tearDown() throws Exception { if (session != null) { // NexacroSession.quit(); } } @Test public void Test_01_Session() { System.out.println('session : ' + session); System.out.println('session.SessionId : ' + session.getSessionId()); }} </CodeTag> 단계 9. 넥사크로 앱을 실행하고 세션을 생성하는 코드를 추가합니다. 위의 코드에서 Setup 메소드를 아래와 같이 수정합니다. <CodeTag> @Beforepublic void setUp() throws Exception { // Launch a new instance of nexacro application or find nexacro application try { // Create a new session to launch nexacro application DesiredCapabilities appCapabilities = new DesiredCapabilities(); appCapabilities.setCapability('app', NexacroAppId); appCapabilities.setCapability('appArguments', NexacroAppAg); appCapabilities.setCapability('appWorkingDir', NexacroAppDr); appCapabilities.setCapability('platformName', TestOs); appCapabilities.setCapability('deviceName', TestDevice); // Request Remote WinAppDriver Service session = new WindowsDriver<RemoteWebElement>(new URL(WindowsApplicationDriverUrl), appCapabilities); session.manage().timeouts().implicitlyWait(1, TimeUnit.SECONDS); } catch (Exception e) { e.printStackTrace(); } finally { }} </CodeTag> 단계 10. 메뉴 [Run > Run As > JUnit Test] 항목을 선택하면 테스트를 진행합니다. 설치한 앱이 실행되는 것을 확인할 수 있습니다. WinAppDriver을 실행한 콘솔 화면에서 접속 정보와 세션이 생성된 것을 확인할 수 있습니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|단위테스트 만들고 실행하기|단위테스트 프로젝트 만들기/4.jpg</ImgTag> 단계 11. JUnit 패널에서 성공한 테스트 정보를 확인할 수 있습니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|단위테스트 만들고 실행하기|단위테스트 프로젝트 만들기/5.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 단위테스트 만들고 실행하기 단위테스트 실행하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 단계 1. 단위테스트를 실행할 코드를 아래와 같이 추가합니다. 현재 세션에서 Button 컴포넌트를 찾고 마우스 클릭 명령을 처리합니다. <CodeTag> 코드 4- C#[TestMethod]public void Test_Button(){ WindowsElement element = session.FindElementByAccessibilityId('mainframe.WorkFrame.form.Button00'); Assert.IsNotNull(element); Thread.Sleep(TimeSpan.FromSeconds(0.1)); element.Click();} </CodeTag> <CodeTag> 코드 4- Java@Testpublic void Test_Button() throws Exception { WebElement element = session.findElementByAccessibilityId('mainframe.WorkFrame.form.Button00'); Assert.assertNotNull(element); Thread.sleep(1000); element.click();} </CodeTag> 단계 2. 테스트를 실행하면 설치한 앱이 실행되고 Button 컴포넌트 위에 마우스 커서가 위치하고 클릭 명령을 실행하는 것을 확인할 수 있습니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|단위테스트 만들고 실행하기|단위테스트 실행하기/1.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> AccessibilityId 속성값 확인하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 컴포넌트나 컨트롤에 접근하기 위해서 FindElementByAccessibilityId 메소드를 사용하는데 이때 AccessibilityId 속성값을 확인해야 합니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> AccessibilityId 속성값 확인하기 컴포넌트 속성값 확인하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> Form에 배치된 컴포넌트 자체에 접근하는 방식은 아래와 같습니다. [MainFrame id 속성값].[ChildFrame id 속성값].form.[Component id 속성값] id 속성값이 'Button00'인 Button 컴포넌트의 엘리먼트를 얻기 위해서는 아래와 같이 코드를 작성합니다. <CodeTag> 코드 4- C#WindowsElement element = session.FindElementByAccessibilityId('mainframe.ChildFrame00.form.Button00'); </CodeTag> Div 컴포넌트 안에 배치한 컴포넌트는 아래와 같이 접근할 수 있습니다. <CodeTag> 코드 4- C#WindowsElement element = session.FindElementByAccessibilityId('mainframe.ChildFrame00.form.Div00.form.CheckBox00'); </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> AccessibilityId 속성값 확인하기 컨트롤 아이템 속성값 확인하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 예를 들어 Div 컴포넌트 안에 배치된 Combo 컴포넌트의 dropbutton은 아래와 같이 엘리먼트를 얻을 수 있습니다. <CodeTag> 코드 4- C#WindowsElement element = session.FindElementByAccessibilityId('mainframe.ChildFrame00.form.Div00.form.Combo00.dropbutton'); </CodeTag> 단위 테스트를 진행하기 위해서는 Combo 컴포넌트의 드롭다운목록을 펼치고 아이템을 선택해야 합니다. 드롭다운목록을 펼치기 위해서는 Combo 컴포넌트 내 ButtonControl에 접근해야 하고 해당 컨트롤의 속성값을 확인해야 합니다. 컨트롤 속성값은 넥사크로 스튜디오에서 Help(단축키 F1)을 실행하면 컴포넌트 개요에서 확인할 수 있습니다. Combo 컴포넌트에서 드롭다운목록을 펼치기 위해 클릭하는 버튼의 id 속성값이 'dropbutton'이라는 것을 확인할 수 있습니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|AccessibilityId 속성값 확인하기|컨트롤, 아이템 속성값 확인하기/1.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> AccessibilityId 속성값 확인하기 Inspect로 속성값 확인하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 주의: 도움말에서 노출되지 않는 속성값(하위 컨트롤)은 제품 버전에 따라 변경될 수 있습니다. 해당 속성값 변경 시 작성된 테스트가 동작하지 않을 수 있습니다. 하지만 드롭다운목록을 펼친 후에 Item 3에 접근하려면 어떻게 해야 하는지는 알려주지 않습니다. 이런 경우에는 'Inspect' 라는 도구를 사용합니다. 'Inspect'는 윈도우 SDK가 설치되어 있다면 설치 경로에서 찾을 수 있습니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|AccessibilityId 속성값 확인하기|Inspect로 속성값 확인하기/1.jpg</ImgTag> 노트: Inspect https://docs.microsoft.com/en-us/windows/desktop/winauto/inspect-objects 단계 1. 윈도우 SDK 설치 경로에서 inspect.exe 파일을 실행합니다. 단계 2. 넥사크로 앱을 실행하고 마우스 커서를 원하는 위치로 가져갑니다. 단계 3. Combo 컴포넌트의 dropdown 버튼을 클릭해서 드롭다운 목록을 펼칩니다. 단계 4. 원하는 아이템 영역에 마우스 커서를 가져갑니다. 아래 그림처럼 Inspect가 인식한 대상 영역에 테두리선이 표시되고 Inspect 창에 관련 정보가 표시됩니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|AccessibilityId 속성값 확인하기|Inspect로 속성값 확인하기/2.jpg</ImgTag> <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|AccessibilityId 속성값 확인하기|Inspect로 속성값 확인하기/3.jpg</ImgTag> 여러 정보가 보여지는데 그 중에서 AccessibilityId 속성값으로 사용할 항목은 'AutomationId'입니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|AccessibilityId 속성값 확인하기|Inspect로 속성값 확인하기/4.jpg</ImgTag> 드롭다운목록에서 2번째 아이템을 선택할 때는 아래와 같이 엘리먼트를 얻을 수 있습니다. <CodeTag> 코드 4- C#WindowsElement element = session.FindElementByAccessibilityId('mainframe.ChildFrame00.form.Div00.form.Combo00.combolist.item_1'); </CodeTag> 아이템에 해당하는 엘리먼트는 드롭다운목록이 펼쳐진 후에 접근할 수 있습니다. 목록을 펼치기 전에 해당 아이템에 접근하려 한다면 테스트 실패로 처리됩니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|AccessibilityId 속성값 확인하기|Inspect로 속성값 확인하기/5.jpg</ImgTag> 테스트 코드에서 아래와 같이 먼저 dropbutton 엘리먼트를 찾아서 마우스 클릭 이벤트를 처리하고 드롭다운목록이 펼쳐지면 그때 원하는 아이템에 접근합니다. <CodeTag> 코드 4- C#[TestMethod]public void Test_00_FindElementItem(){ WindowsElement element = session.FindElementByAccessibilityId('mainframe.ChildFrame00.form.Div00.form.Combo00.dropbutton'); Assert.IsNotNull(element); element.Click(); Thread.Sleep(TimeSpan.FromSeconds(0.1)); WindowsElement elementItem = session.FindElementByAccessibilityId('mainframe.ChildFrame00.form.Div00.form.Combo00.combolist.item_1'); Assert.IsNotNull(elementItem); Debug.WriteLine('elementItem.Text:' + elementItem.Text);} </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 기능별 데모 단위 테스트 실행하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 기능별 데모를 실행하기 위한 넥사크로 앱 설치파일과 Java, C# 샘플 파일을 내려받을 수 있습니다. 단계 1. 웹브라우저에서 아래 주소로 접속합니다. https://github.com/TOBESOFT-DOCS/sample_nexacroplatform_17_winappdriver 2개의 폴더와 하나의 설치파일을 확인할 수 있습니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|기능별 데모 단위 테스트 실행하기/1.jpg</ImgTag> 단계 2. nexacro17_SetupRuntime_x86.exe 파일을 내려받습니다. 파일명을 마우스로 클릭하면 [Download] 버튼을 확인할 수 있습니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|기능별 데모 단위 테스트 실행하기/2.jpg</ImgTag> 단계 3. 내려받은 설치파일을 실행해 앱을 설치합니다. 아래 경로에 앱이 설치됩니다. C:\Program Files (x86)\nexacro\17\app0201 단계 4. 단위테스트 프로젝트 만들기에서 만든 프로젝트에 C#, Java 샘플을 붙여넣습니다. 단계 5. 단위테스트를 실행합니다. 정상적으로 단위테스트가 처리되는지 확인합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|기능별 데모 단위 테스트 실행하기/3.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 지원 인터페이스<|eot_id|><|start_header_id|>assistant<|end_header_id|> 주의: SeleniumRC, Appium 인터페이스를 모두 지원하지는 않습니다. 넥사크로 플랫폼에서 지원할 수 없거나 WinAppDriver에서 지원하지 않는 기능은 제외했습니다. 노트: 아래 항목은 클라이언트에서 별도 인터페이스를 지원하지 않고 웹브라우저에서 직접 호출하거나 HttpWebResponse 등을 사용해 호출한 경우 사용할 수 있습니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스/1.png</ImgTag> <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스/1.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Session 세션 생성하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> winappdriver 정보로 세션을 생성하고 앱을 실행합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Session/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Session 세션 종료하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 세션을 종료하고 해당 앱을 종료합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Session/1.png</ImgTag> 주의: WinAppDriver에서 제공하는 인터페이스 중 일부는 넥사크로에서 지원하지 않습니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Timeout 타임아웃 설정하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 세션 동작 시 적용할 timeout 값을 설정합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Timeout/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Frame Mainframe 정보 확인하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> MainFrame 오브젝트의 titletext 속성값을 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Frame/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Window 활성화된 윈도우 변경하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 현재 윈도우를 변경합니다. Windowhandle은 session.WindowHandles에서 얻을 수 있습니다. 최초 실행시에는 MainFrame 오브젝트가 현재 윈도우로 설정됩니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Window/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Window 활성화된 윈도우 종료하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 현재 윈도우를 종료합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Window/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Window 활성화된 윈도우 핸들 얻기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 현재 윈도우 핸들 오브젝트를 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Window/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Window 윈도우 핸들 배열 얻기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 모든 윈도우 핸들 오브젝트를 배열 형태로 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Window/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Window 윈도우 크기 정보 확인하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 윈도우 크기를 Size 오브젝트 형태로 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Window/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Window 윈도우 크기 변경하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 윈도우 크기를 변경합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Window/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Window 윈도우 위치 정보 확인하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 윈도우 위치를 Point 오브젝트 형태로 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Window/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Window 윈도우 위치 변경하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 윈도우 좌표를 변경합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Window/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Window 윈도우 최대화<|eot_id|><|start_header_id|>assistant<|end_header_id|> 윈도우 크기를 최대화합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Window/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 지원 인터페이스 Element<|eot_id|><|start_header_id|>assistant<|end_header_id|> Element는 WinAppDriver 동작의 최소단위입니다. 넥사크로에서는 컴포넌트, 컨트롤의 구성요소인 nexacro Element를 Element로 처리합니다. ControlElement가 컴포넌트를 둘러싸고 있고 그 안에 ContainerElement, InputElement, IconTextElement, TextElement 등의 Element가 자리잡고 있습니다. Button 컴포넌트의 경우는 아래와 같이 구성됩니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/1.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Element 엘리먼트 얻기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 컴포넌트, 컨트롤의 ControlElement 오브젝트를 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/1.png</ImgTag> 노트: 넥사크로 플랫폼에서 open 메소드 실행 시 objParentFrame 파라미터값을 null로 설정한 경우에는 ChildFrame ID를 기준으로 접근합니다. <CodeTag> 코드 4- C#// parent null 지정시 : nexacro.open('openframe', url, null, ...) nexaButton00 = session.FindElementByAccessibilityId('openframe.form.Button00');// parent frame 지정시 : nexacro.open('openframe', url, ownerframe, ...)nexaButton00 = session.FindElementByAccessibilityId('mainframe.ChildFrame00.openframe.form.Button00'); </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Element 엘리먼트 배열 얻기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 컴포넌트, 컨트롤의 ControlElement 오브젝트 목록을 배열값으로 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Element 엘리먼트 id값 확인하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> WinAppDriver Element의 id값을 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Element 엘리먼트에 표시되는 텍스트 정보 확인하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> Element의 텍스트값을 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/1.png</ImgTag> 노트: 넥사크로에서 지정한 속성값은 화면에 보여지는 텍스트를 우선적으로 처리합니다. 우선순위는 아래와 같습니다. displaytext > text > titletext > value<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Element 엘리먼트 마우스 클릭 이벤트 처리하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> Element의 가운데 위치에서 마우스 클릭 이벤트가 발생합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/1.png</ImgTag> 주의: 엘리먼트의 가운데 위치에서 마우스 클릭 이벤트가 발생하기 때문에 MaskEdit 컴포넌트 같은 경우 캐럿 위치가 맨 앞으로 이동하지 않습니다. 이런 경우에는 CTRL+'A' 키를 입력해서 입력 영역 전체 선택 후 문자열을 입력하는 방법을 사용할 수 있습니다. <CodeTag> 코드 4- C#[TestMethod]public void Test_10_MaskEditInput(){ WindowsElement nexaMaskEdit00 = session.FindElementByAccessibilityId('mainframe.ChildFrame00.form.MaskEdit00'); Assert.IsNotNull(nexaMaskEdit00); Thread.Sleep(TimeSpan.FromSeconds(0.1)); nexaMaskEdit00.Clear(); nexaMaskEdit00.Click(); nexaMaskEdit00.SendKeys(Keys.Control + 'a'); Thread.Sleep(TimeSpan.FromSeconds(0.1)); nexaMaskEdit00.SendKeys('abcde1234'+Keys.Enter); Assert.AreEqual('abcde-1234', nexaMaskEdit00.Text);} </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Element 엘리먼트 입력값 지우기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 텍스트 편집 영역을 가지고 있는 컴포넌트의 입력값을 지웁니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Element 엘리먼트에 키보드 입력값 전달하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 키보드 입력값을 처리합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/1.png</ImgTag> 노트: 컴포넌트에 따라 입력값이 처리되는 방식이 다릅니다. 제품 도움말에서 컴포넌트의 'Basic Key Action' 항목을 참고해주세요. 주의: 키보드 입력 값 전달 시에는 해당 앱이 활성화되어 있어야 하고 2개 이상의 윈도우가 표시된 경우 동작 대상 윈도우가 활성화되어야 합니다. 주의: 동작 대상 엘리먼트에 마우스 클릭 이벤트를 처리한 후 키보드 입력 값을 전달해야 정상적으로 동작합니다. 주의: 2개 이상의 디스플레이를 사용하는 경우 키보드 입력 값이 정상적으로 전달되지 않는 경우가 있습니다. 디스플레이를 하나만 사용하던지, WinAppDriver를 다시 시작해주세요.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Element 엘리먼트 선택 여부 확인하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> Element의 Selected 상태값을 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/1.png</ImgTag> 노트: 넥사크로에서 지원하는 컴포넌트, 컨트롤은 아래와 같습니다. CheckBox, RadioButton, TabButton, ListBoxItem, MenuItem, TreeCell, GridCell<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Element 엘리먼트 사용 가능 여부 확인하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> Element의 Enabled 상태값을 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Element 엘리먼트 화면 표시 여부 확인하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> Element의 화면 표시 여부를 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/1.png</ImgTag> 노트: 컴포넌트의 visible 속성값을 반환하는 것이 아니라 실제 화면에서의 표시 여부를 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/2.png</ImgTag> 주의: 컴포넌트의 visible 속성값을 false로 설정하고 앱이 시작하는 경우 해당 Element를 찾을 수 없습니다. 넥사크로에서는 visible 속성값이 true인 경우에만 Element를 생성하기 때문입니다. 앱 로드 시에는 visible 속성값을 true로 설정하고 onload 이벤트 함수 내에서 컴포넌트의 visible 속성값을 false로 변경하면 Element를 처리할 수 있습니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Element 엘리먼트 크기 정보 확인하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> Element 크기를 Size 오브젝트 형태로 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Element 엘리먼트 위치 정보 확인하기 (상위 엘리먼트 기준)<|eot_id|><|start_header_id|>assistant<|end_header_id|> Element 위치를 상위 Element 기준에서 Point 오브젝트 형태로 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Element 엘리먼트 위치 정보 확인하기 (Screen 기준)<|eot_id|><|start_header_id|>assistant<|end_header_id|> Element 위치를 Screen 기준에서 Point 오브젝트 형태로 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Element 활성화된 엘리먼트 얻기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 현재 활성화된 Element를 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Element 2개의 엘리먼트 비교하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> Element를 비교해서 같은 Element인지 확인합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/1.png</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Element 엘리먼트의 UIA 인터페이스 속성값 확인하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> Element의 UIA Interface의 attribute 값을 제공합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|Element/1.png</ImgTag> 노트: Automation Element Property Identifiers https://docs.microsoft.com/en-us/windows/desktop/WinAuto/uiauto-automation-element-propids<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> ScreenShot 윈도우 엘리먼트 스크린샷 얻기<|eot_id|><|start_header_id|>assistant<|end_header_id|> Screen 윈도우 영역 또는 Element를 Screenshot 오브젝트로 반환합니다. <ImgTag>응용 개발 가이드|윈도우 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스|ScreenShot/1.png</ImgTag> 노트: SaveAsFile 메소드, AsBase64EncodedString 속성을 사용해 이미지 파일 또는 Base64 형태로 변환할 수 있습니다. 주의: 윈도우가 최상위에 노출되어야 정상적인 스크린샷을 얻을 수 있습니다. 주의: Java 코드에서는 권한이 있는 저장소만 접근할 수 있습니다. <CodeTag> 코드 4- JavaFileHandler.copy(sessionshot, new File(System.getProperty('user.home')+'\\Downloads\\SessionScreenShot.png')); </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 관련 링크 정보<|eot_id|><|start_header_id|>assistant<|end_header_id|> WebDriver Interface http://www.w3.org/TR/webdriver1/ https://www.seleniumhq.org/projects/webdriver/ https://developer.mozilla.org/en-US/docs/Web/WebDriver AppDriver Interface https://github.com/Microsoft/WinAppDriver https://appium.io/docs/en/drivers/windows/ https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ UIA Interface https://docs.microsoft.com/en-us/windows/desktop/WinAuto/entry-uiauto-win32 https://docs.microsoft.com/en-us/windows/desktop/winauto/testing-tools https://en.wikipedia.org/wiki/Microsoft_UI_Automation MSAA Interface https://docs.microsoft.com/en-us/windows/desktop/WinAuto/microsoft-active-accessibility https://docs.microsoft.com/en-us/windows/desktop/winauto/testing-tools https://en.wikipedia.org/wiki/Microsoft_Active_Accessibility<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 안드로이드 운영체제 NRE에서 단위 테스트 실행하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> Appium 연동 기능은 넥사크로에서 제공하는 UIAutomation2 인터페이스를 사용해 Android NRE에서 실행하는 앱의 속성을 읽거나 쓰고 파라미터를 지정해 메소드를 실행하는 것을 지원합니다. 셀레니움 같은 UI 자동화 테스트 도구를 사용해 단위 테스트를 작성하고 테스트할 수 있습니다. 이번 장에서는 Appium를 설치하고 비주얼 스튜디오 코드에서 기본적인 Java 프로젝트를 생성해 넥사크로 앱에 연결하는 단계를 살펴봅니다. 노트: 아래 내용은 Appium 1.19.1, 안드로이드 스튜디오 4.1.1 버전을 기준으로 작성했습니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Appium 연동 환경 설정하기 Appium 설치하고 단말기 연결 확인하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 단계 1. 안드로이드 스튜디오와 안드로이드 SDK, JDK가 설치되어 있는지 확인합니다. 단계 2. 테스트할 단말기에 개발자 옵션을 활성화하고 아래 3개 옵션을 사용으로 체크해줍니다. USB debugging Install via USB USB debugging (Security settings) 단계 3. 테스트를 진행할 PC에 Appium 설치파일을 내려받고 설치합니다. https://github.com/appium/appium-desktop/releases/latest 단계 4. 단말기와 PC를 USB 케이블을 사용해 연결합니다. 단계 5. adb 명령어로 연결된 단말기 일련번호를 확인합니다. 아래에서는 '0a388e93'이 연결된 단말기 일련번호입니다. $ adb devices List of devices attached 0a388e93 device usb:1-1 product:razor model:Nexus_7 device:flo 단계 6. 테스트할 단말기에 넥사크로 앱을 설치합니다. 앱 빌드 시 Package Name은 'nexacro', Program Name은 'TEST0120'으로 설정했습니다. 단계 7. PC에서 Appium을 실행합니다. 단계 8. [Start Server] 버튼을 클릭해 Appium 서버를 시작합니다. 윈도우 운영체제 환경이라면 Host 설정을 '127.0.0.1'로 변경합니다. <ImgTag>응용 개발 가이드|안드로이드 운영체제 NRE에서 단위 테스트 실행하기|Appium 연동 환경 설정하기|Appium 설치하고 단말기 연결 확인하기/1.jpg</ImgTag> 단계 9. [Start Inspector Session] 버튼을 클릭해 Appium Inspector 창을 띄웁니다. <ImgTag>응용 개발 가이드|안드로이드 운영체제 NRE에서 단위 테스트 실행하기|Appium 연동 환경 설정하기|Appium 설치하고 단말기 연결 확인하기/2.jpg</ImgTag> 단계 10. [Custom Server] 탭에서 JSON Representaion 항목을 아래와 같이 입력합니다. <CodeTag> { 'platformName': 'Android', 'platformVersion': '10', 'appPackage': 'nexacro.TEST0120', 'appActivity': '.MainActivity', 'automationName': 'UIAutomator2', 'autoGrantPermissions': 'true', 'deviceName': '0a388e93'} </CodeTag> <ImgTag>응용 개발 가이드|안드로이드 운영체제 NRE에서 단위 테스트 실행하기|Appium 연동 환경 설정하기|Appium 설치하고 단말기 연결 확인하기/1.png</ImgTag> <ImgTag>응용 개발 가이드|안드로이드 운영체제 NRE에서 단위 테스트 실행하기|Appium 연동 환경 설정하기|Appium 설치하고 단말기 연결 확인하기/3.jpg</ImgTag> 노트: 추가로 설정할 수 있는 항목은 아래 링크를 참고하세요. http://appium.io/docs/en/writing-running-appium/caps/ 단계 11. [Start Session] 버튼을 클릭합니다. 노트: 최초 실행 시에는 단말기에 Appium Settings 앱이 설치됩니다. 단계 12. 테스트할 단말기에서 앱이 실행되고 Appium Inspector 창에 앱이 실행된 상태가 표시되는지 확인합니다. <ImgTag>응용 개발 가이드|안드로이드 운영체제 NRE에서 단위 테스트 실행하기|Appium 연동 환경 설정하기|Appium 설치하고 단말기 연결 확인하기/4.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Appium 연동 환경 설정하기 테스트 프로젝트 실행 환경 설정하고 테스트하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 단계 1. Visual Studio Code를 설치합니다. 단계 2. 사이드바에서 Extensions를 선택하고 Java Extension Pack을 설치합니다. <ImgTag>응용 개발 가이드|안드로이드 운영체제 NRE에서 단위 테스트 실행하기|Appium 연동 환경 설정하기|테스트 프로젝트 실행 환경 설정하고 테스트하기/1.jpg</ImgTag> 단계 3. 프로젝트 실행에 필요한 appium, selenium, testng 라이브러리를 설정합니다. 노트: Maven, Gradle, Eclipse plug-in 등의 설정은 관련 문서를 참고하세요. client-combined-3.141.59.jar (https://www.selenium.dev/downloads/) byte-buddy-1.8.15.jar commons-exec-1.3.jar guava-25.0-jre.jar okhttp-3.11.0.jar okio-1.14.0.jar testng-7.3.0.jar (https://testng.org/doc/download.html) jcommander-1.78.jar java-client-7.4.1.jar (https://github.com/appium/java-client) commons-lang3-3.11.jar (https://commons.apache.org/proper/commons-lang/) 단계 4. Java Project를 생성하고 BaseClass.java 파일을 아래와 같이 작성합니다. <CodeTag> package tests;import java.net.MalformedURLException;import java.net.URL;import org.openqa.selenium.remote.DesiredCapabilities;import org.testng.annotations.AfterTest;import org.testng.annotations.BeforeTest;import org.testng.annotations.Test;import io.appium.java_client.MobileElement;import io.appium.java_client.android.AndroidDriver;public class BaseClass { AndroidDriver<MobileElement> driver; final String URL_STRING = 'http://127.0.0.1:4723/wd/hub'; @BeforeTest public void setup() { System.out.println('setup'); DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability('automationName', 'UiAutomator2'); capabilities.setCapability('platformName', 'Android'); capabilities.setCapability('platformVersion', '10'); capabilities.setCapability('deviceName', '0a388e93'); capabilities.setCapability('autoGrantPermissions', 'true'); capabilities.setCapability('appPackage', 'nexacro.TEST0120'); capabilities.setCapability('appActivity', '.MainActivity'); try { driver = new AndroidDriver<MobileElement>(new URL(URL_STRING), capabilities); } catch (MalformedURLException e) { System.out.println('MalformedURLException'); e.printStackTrace(); } catch (Exception e) { System.out.println('Exception'); e.printStackTrace(); } } @Test public void sampleTest() { System.out.println('sampleTest'); } @AfterTest public void teardown() { System.out.println('teardown'); driver.close(); }} </CodeTag> 단계 5. 사이드바에서 Test를 선택하고 BaseClass 항목에 있는 [Run] 버튼을 클릭합니다. <ImgTag>응용 개발 가이드|안드로이드 운영체제 NRE에서 단위 테스트 실행하기|Appium 연동 환경 설정하기|테스트 프로젝트 실행 환경 설정하고 테스트하기/2.jpg</ImgTag> 단계 6. 테스트할 단말기에서 앱이 실행되고 DEBUG CONSOLE에 정상적으로 테스트 성공 메시지가 표시되는 것을 확인합니다. <ImgTag>응용 개발 가이드|안드로이드 운영체제 NRE에서 단위 테스트 실행하기|Appium 연동 환경 설정하기|테스트 프로젝트 실행 환경 설정하고 테스트하기/3.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 단위 테스트 만들고 실행하기<|eot_id|><|start_header_id|>assistant<|end_header_id|> 단계 1. 넥사크로 앱을 아래와 같이 수정하고 업데이트합니다. 상단에 Button 컴포넌트를 배치하고 그 아래에 Edit 컴포넌트를 배치합니다. <ImgTag>응용 개발 가이드|안드로이드 운영체제 NRE에서 단위 테스트 실행하기|단위 테스트 만들고 실행하기/1.jpg</ImgTag> Button 컴포넌트의 onclick 이벤트 핸들러 함수를 아래와 같이 작성합니다. <CodeTag> this.Button00_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo){ this.Edit00.set_value('BUTTON CLICK');}; </CodeTag> 단계 2. Tests.java 파일을 아래와 같이 작성합니다. <CodeTag> package tests;import java.net.MalformedURLException;import java.util.concurrent.TimeUnit;import org.testng.annotations.Test;public class Tests extends BaseClass { @Test public void testOne() throws MalformedURLException, InterruptedException { System.out.println('testOne'); int nTestSpeed = 2000; driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS); driver.findElementById('mainframe.WorkFrame.form.Button00').click(); Thread.sleep(nTestSpeed); }} </CodeTag> 단계 3. 사이드바에서 Test를 선택하고 Tests 항목에 있는 [Run] 버튼을 클릭합니다. 단계 4. 테스트할 단말기에서 앱이 실행되고 Button 클릭 이벤트가 정상적으로 처리되어 Edit 컴포넌트의 값이 변경되는지 확인합니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 지원 인터페이스<|eot_id|><|start_header_id|>assistant<|end_header_id|> <ImgTag>응용 개발 가이드|안드로이드 운영체제 NRE에서 단위 테스트 실행하기|지원 인터페이스/1.png</ImgTag> 동작 원리<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 프로젝트 및 파일 구조<|eot_id|><|start_header_id|>assistant<|end_header_id|> 넥사크로에서 화면을 만들려면 먼저 프로젝트를 생성해야 합니다. 그리고 프로젝트에 필요한 컴포넌트, 스크린 정보, 환경 정보, 테마 또는 스타일 등의 파일을 생성하거나 기존 정보를 연결합니다. 화면은 앱 형태로 실행될 수 있으며 Form 화면 자체로 실행될 수 있습니다. 이번 장에서는 프로젝트나 Form 생성 시 작업 폴더에 생성되는 각 파일은 어떤 것이 있으며 어떤 기능을 수행하는지 설명합니다. 추가로 제너레이트 과정을 거치면서 변환되는 파일도 설명합니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 프로젝트 생성<|eot_id|><|start_header_id|>assistant<|end_header_id|> 프로젝트는 화면 개발을 위한 기본 설정 정보를 담고 있습니다. 프로젝트를 새로 만들면 프로젝트 설정 파일 뿐 아니라 프로젝트를 구성하기 위한 기본적인 파일이 해당 폴더에 생성됩니다. 일반적으로 프로젝트 생성 시 만들어지는 파일은 아래와 같습니다. <ImgTag>응용 개발 가이드|프로젝트 및 파일 구조|프로젝트 생성/1.png</ImgTag> 노트: 프로젝트 생성 시 [Frame] 항목 설정에 따라 서비스 폴더는 추가될 수 있습니다. 예를 들어 두 개 이상의 프레임을 가지는 화면을 설정했다면 Frame 서비스 폴더가 자동 생성됩니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 프로젝트 생성 프로젝트 설정 파일 (XPRJ)<|eot_id|><|start_header_id|>assistant<|end_header_id|> 프로젝트 생성 시 자동으로 생성됩니다. Application 설정 파일 정보는 추가하거나 삭제할 수 있습니다. <CodeTag> <?xml version='1.0' encoding='utf-8'?><Project version='2.1'> <EnvironmentDefinition url='environment.xml'/> <TypeDefinition url='typedefinition.xml'/> <AppVariables url='appvariables.xml'/> <AppInfos> <AppInfo url='[file name].xadl'/> <AppInfo url='[file name].xadl'/> </AppInfos></Project> </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 프로젝트 생성 Application 설정 파일 (XADL)<|eot_id|><|start_header_id|>assistant<|end_header_id|> 프로젝트 생성 시 자동으로 생성되며 필요에 따라 추가로 생성할 수 있습니다. 프로젝트는 하나 이상의 App Info를 포함해야 합니다. App Info가 하나인 경우 이를 삭제하려 하면 아래와 같은 경고 메시지를 보여주고 삭제하지 않습니다. <ImgTag>응용 개발 가이드|프로젝트 및 파일 구조|프로젝트 생성|Application 설정 파일 (XADL)/1.jpg</ImgTag> <CodeTag> <?xml version='1.0' encoding='utf-8'?><ADL version='2.0'> <Application id='[id]' screenid='[screen id]'> <Layout> <MainFrame/> </Layout> </Application> <Script type='xscript5.1'><![CDATA[…]]></Script></ADL> </CodeTag> Application 설정 파일은 스크립트 코드를 추가할 수 있습니다. ADL 또는 각 프레임 오브젝트의 이벤트 처리나 Application 단위에서 처리할 스크립트를 관리합니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 프로젝트 생성 Type Definition<|eot_id|><|start_header_id|>assistant<|end_header_id|> 모듈, 컴포넌트, 서비스, 프로토콜, 업데이트 정보 설정 파일 정보를 관리합니다. 각 항목은 프로젝트 생성 후 추가, 변경, 삭제할 수 있습니다. 프로토콜 정보와 배포 옵션은 빌드 과정에서 자동으로 편집되기도 합니다. <ImgTag>응용 개발 가이드|프로젝트 및 파일 구조|프로젝트 생성|Type Definition/1.png</ImgTag> <CodeTag> <?xml version='1.0' encoding='utf-8'?><TypeDefinition version='3.0'> <Modules> <Module url='CompBase.json'/> <Module url='ComComp.json'/> <Module url='Grid.json'/> <Module url='DeviceAPI.json'/> </Modules> <Components> <Component type='JavaScript' id='Button' classname='nexacro.Button'/> <Component type='JavaScript' id='Combo' classname='nexacro.Combo'/> <Component type='JavaScript' id='Edit' classname='nexacro.Edit'/> ... </Components> <Services> <Service prefixid='theme' type='resource' url='./_resource_/_theme_/' version='0' communicationversion='0'/> <Service prefixid='initvalue' type='resource' url='./_resource_/_initvalue_/' version='0' communicationversion='0'/> <Service prefixid='xcssrc' type='resource' url='./_resource_/_xcss_/'/> <Service prefixid='imagerc' type='resource' url='./_resource_/_images_/'/> <Service prefixid='font' type='resource' url='./_resource_/_font_/' version='0' communicationversion='0'/> <Service prefixid='Base' type='form' cachelevel='session' url='./Base/' version='0' communicationversion='0'/> </Services> <Protocols/> <Update/></TypeDefinition> </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 프로젝트 생성 Environment<|eot_id|><|start_header_id|>assistant<|end_header_id|> Screen 정보, Variable, Cookie, HTTP Header 정보를 관리합니다. 프로젝트는 하나 이상의 Screen 정보를 포함해야 합니다. Screen 정보가 하나인 경우 이를 삭제하려 하면 아래와 같은 경고 메시지를 보여주고 삭제하지 않습니다. <ImgTag>응용 개발 가이드|프로젝트 및 파일 구조|프로젝트 생성|Environment/1.jpg</ImgTag> <CodeTag> <?xml version='1.0' encoding='utf-8'?><ENV version='2.1'> <Environment themeid='theme::default' datatyperule='2.0'> <ScreenDefinition> <Screen id='[Screen id]' type='[type property value]'/> </ScreenDefinition> <Variables/> <Cookies/> </Environment></ENV> </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 프로젝트 생성 AppVariables<|eot_id|><|start_header_id|>assistant<|end_header_id|> App에서 공통으로 사용할 수 있는 Dataset, Variable 정보를 관리합니다. <CodeTag> <?xml version='1.0' encoding='utf-8'?><AppVariables version='2.0'> <Datasets> <Dataset id='[Dataset id]'> <ColumnInfo/> <Rows/> </Dataset> </Datasets> <Variables> <Variable id='[Variable id]' initval='[init value]'/> </Variables></AppVariables> </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 리소스 initValue<|eot_id|><|start_header_id|>assistant<|end_header_id|> 프로젝트 생성 시에는 폴더만 생성하고 파일을 만들지는 않습니다. initValue 설정값을 저장할 XML 파일을 생성하고 해당 파일에 필요한 오브젝트의 속성 정보를 지정합니다. 파일을 생성하면 오브젝트를 선택하고 initValue를 추가할 수 있습니다. XML 파일 형식이지만 확장자는 .xiv입니다. <CodeTag> <?xml version='1.0' encoding='utf-8'?><GlobalPropInitvalueDefinition> <nexacro.Button> <initvalueid id='[initvalueid ]' ... /> </nexacro.Button> <nexacro.Edit> <initvalueid id='[initvalueid ]' ... /> </nexacro.Edit></GlobalPropInitvalueDefinition> </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 리소스 테마 (XTHEME)<|eot_id|><|start_header_id|>assistant<|end_header_id|> 프로젝트 생성 후 넥사크로 스튜디오 [Resource Explorer] 창을 확인해보면 기본 설치 테마가 포함된 [Nexacro Theme] 항목과 새로운 테마를 추가할 수 있는 [Theme] 항목이 표시됩니다. [Theme] 항목에는 기존 테마를 복사해 넣거나 새 테마를 만들 수 있습니다. 기본 테마는 스타일 설정 파일(theme.xcss)과 이미지 파일 집합으로 구성됩니다. 주의: [Nexacro Theme] 항목 아래에 표시되는 테마 파일은 별도 캐시 공간에 저장되어 관리됩니다. 기본 테마 파일은 수정할 수 없습니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 리소스 ImageResource<|eot_id|><|start_header_id|>assistant<|end_header_id|> 프로젝트 내에서 공통으로 사용할 수 있는 이미지 파일을 관리합니다. Image 리소스로 추가한 이미지 파일은 Form 작성 시 이미지 파일이 필요한 속성을 지정할 때 속성창에 노출되며 해당 이미지 파일을 속성값으로 지정할 수 있습니다. <ImgTag>응용 개발 가이드|프로젝트 및 파일 구조|리소스|ImageResource/1.jpg</ImgTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 리소스 UserFont<|eot_id|><|start_header_id|>assistant<|end_header_id|> 프로젝트 내에서 사용할 폰트 파일을 관리합니다. 폰트 파일(woff, ttf, off)과 폰트를 정의한 UserFont 파일을 관리합니다. UserFont 파일은 xfont 확장자로 저장되며 아래와 같은 형식으로 작성합니다. <CodeTag> @font-face { font-family : 'NanumGothic'; font-style : normal; font-weight : 400; src : local('NanumGothic'), url(NanumGothic.ttf) format('truetype'), url(NanumGothic.eot), url(NanumGothic.eot?#iefix) format('embedded-opentype'), url(NanumGothic.wpff2) format('woff2'), url(NanumGothic.woff) format('woff'),} </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 기타 Form (XFDL)<|eot_id|><|start_header_id|>assistant<|end_header_id|> 사용자가 업무를 수행하기 위해 접하는 화면을 정의하고 화면 내에서 보이지 않게 처리되는 연산이나 서버와 데이터 통신을 위한 프로그래밍 코드를 담고 있습니다. <ImgTag>응용 개발 가이드|프로젝트 및 파일 구조|기타|Form (XFDL)/1.png</ImgTag> <CodeTag> <?xml version='1.0' encoding='utf-8'?><FDL version='2.1'> <Form> <Layouts> <Layout> <Button/> </Layout> </Layouts> <Script type='xscript5.1'><![CDATA[]]></Script> <Objects> <Dataset/> </Objects> <Bind> <BindItem/> </Bind> </Form></FDL> </CodeTag> 주의: Form에서 스타일 설정 파일을 별도 지정할 수는 없습니다. 스타일 설정 파일은 Application 단위로만 지정할 수 있습니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 기타 스크립트 (XJS)<|eot_id|><|start_header_id|>assistant<|end_header_id|> 특정 Form에만 필요한 스크립트는 Form 파일에 같이 작성하지만, Application 내 전체 화면에서 사용하는 스크립트는 별도 작성하고 각 Form에서 이를 참조하도록 합니다. 작성된 스크립트는 Form에서 다음과 같이 참조할 수 있습니다. <CodeTag> include 'lib::comLib.xjs' </CodeTag> 공통으로 참조하는 스크립트가 많은 경우 여러 파일로 분리해 관리할 수도 있습니다. 참조하는 파일이 많은 경우에는 스크립트 코드 안에서 다시 다른 코드를 참조하도록 합니다. 예를 들어 comLib.xjs 스크립트 파일을 다음과 같이 구성할 수 있습니다. 이렇게 구성하면 참조할 파일이 늘어나더라도 업무에서 사용하는 Form 파일은 건드리지 않고 comLib.xjs 파일만 수정해 기능을 추가할 수 있습니다. <CodeTag> include 'lib::comConstants.xjs';include 'lib::comService.xjs';include 'lib::comForm.xjs';include 'lib::comGrid.xjs'; include 'lib::comUtil.xjs';include 'lib::comDataset.xjs'; </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 기타 스타일 설정 파일 (XCSS)<|eot_id|><|start_header_id|>assistant<|end_header_id|> CSS 표준이 있지만, 여전히 웹브라우저마다 적용되는 방식이 다릅니다. 그래서 개발 과정에서 특정 브라우저마다 필요한 CSS 속성을 지정해주어야 합니다. 넥사크로는 CSS 표준에 따라 하나의 코드만 작성해주면 빌드 과정에서 각 브라우저에 맞는 CSS 코드를 자동으로 생성합니다. <CodeTag> <?xml version='1.0' encoding='utf-8'?><XCSS type='xcss1.0'><![CDATA[.Button{ background : #c0504d; -nexa-text-align : left;}]]></XCSS> </CodeTag> 스타일 설정 파일에 위의 예제처럼 표준 CSS 속성과 넥사크로에서 추가 지원하는 속성이 같이 지정된 경우 빌드 과정에서 아래와 같은 CSS 코드가 생성됩니다. <CodeTag> .Button{ background : #c0504d;}.Button .nexacontentsbox{ text-align : left;} </CodeTag> 주의: 스타일 설정 파일은 XML 형식으로 작성합니다. 또한, 내부에서 사용하는 코드가 표준 CSS를 준수하는 것이지 모든 CSS 속성을 지원하는 것은 아닙니다. 주의: 스타일 설정 파일은 Application 단위로만 지정할 수 있습니다. 전체 프로젝트 스타일은 테마, Application 단위 스타일은 스타일 설정 파일을 사용합니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 앱 구동 시나리오<|eot_id|><|start_header_id|>assistant<|end_header_id|> 넥사크로 앱이 실행되는 과정은 아래와 같습니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> bootstrap<|eot_id|><|start_header_id|>assistant<|end_header_id|> Application을 로딩하기 위해 관련 정보를 확인하고 필요한 자원을 가져오는 과정을 설명합니다. 이 과정을 부트스트랩이라고 표현합니다. <ImgTag>응용 개발 가이드|앱 구동 시나리오|bootstrap/1.png</ImgTag> 팁: 일반적으로 부트스트랩은 컴퓨터가 외부 입력 없이 스스로 시작할 준비를 하는 과정을 의미합니다. 주로 메모리에 담긴 정보를 기반으로 동작하며 부팅(booting)이라고 표현하기도 합니다. https://en.wikipedia.org/wiki/Bootstrapping 넥사크로 앱 실행과정에서 사용하는 부트스트랩이라는 용어는 앱을 시작할 준비를 하는 과정이라는 표현을 담고 있습니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> Application 로딩<|eot_id|><|start_header_id|>assistant<|end_header_id|> 앱이 실행되기 위해 Application과 연결된 폼을 로딩하는 과정은 아래와 같습니다. <ImgTag>응용 개발 가이드|앱 구동 시나리오|Application 로딩/1.png</ImgTag> 주의: 로딩 순서에 따라 아직 생성되지 않는 항목은 사용할 수 없습니다. 예를 들어 Environment.onload 이벤트 함수 내에서 AppVariables에 접근하게 되면 undefined로 표시됩니다. <CodeTag> this.Environment_onload = function(obj:nexacro.Environment,e:nexacro.LoadEventInfo){ trace(nexacro.getApplication().all['Variable0']); //undefined} </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 폼 로딩<|eot_id|><|start_header_id|>assistant<|end_header_id|> 앞에서 설명한 Application 로딩 항목에서 'Form 로딩'부터 'Form.onload 이벤트 발생' 사이의 과정을 좀 더 상세히 살펴보면 아래와 같습니다. Form 로딩 Form 실행 서브파일 다운로드 및 실행 Form 초기화 Form Style 속성 설정 Form 속성 설정 오브젝트, 컴포넌트, 바인드아이템(BindItem) 생성 엔진 내부에서 처리하는 스크립트 수행 이벤트핸들러 등록 오브젝트, 컴포넌트 메소드 호출: Object.createComponent 이벤트 발생: Form.oninit 메소드 호출: Form.on_created 오브젝트, 컴포넌트 메소드 호출: Object.on_created 이미지 로딩, transaction 처리 이벤트 발생: Form.onload 노트: 서브파일은 include 방식으로 연결되는 스크립트 파일 등을 의미합니다. 노트: Form에 포함된 Object, Component는 지정된 Z-Order 순서대로 생성합니다. 주의: div, tab 컴포넌트는 url 속성으로 연결된 Form을 가져오는 네트워크 속도에 따라 로딩이 끝나는 시점이 달라질 수 있습니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 넥사크로플랫폼 스크립트 언어<|eot_id|><|start_header_id|>assistant<|end_header_id|> 넥사크로 앱을 개발할 때는 자바스크립트 문법을 기본적으로 사용합니다. 자바스크립트 기본 문법에서 제공하지 않는 추가적인 기능을 처리하기 위해 별도 API를 제공합니다. 작성된 스크립트 코드는 빌드 과정을 거쳐 그대로 웹 브라우저나 모바일 디바이스에서 동작하도록 자바스크립트 코드로 변환됩니다. 이번 장에서는 넥사크로에서 스크립트 작성 시 기본적으로 알아야 하는 문법적인 요소와 주의 사항을 설명합니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 유효범위(Scope)<|eot_id|><|start_header_id|>assistant<|end_header_id|> 유효범위는 접근 가능한 변수의 범위와 관련된 내용을 설명합니다. 유효범위 또는 영역이라고 표기하며 영문 표기 그대로 사용하기도 합니다. 업무에 사용하는 앱은 여러 개의 화면을 동시에 조작하거나 하나의 변수를 여러 화면에서 참조하는 경우가 많습니다. 유효범위를 사용하면 원하는 자원에 정확하게 접근할 수 있습니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 유효범위(Scope) 로컬 (local)<|eot_id|><|start_header_id|>assistant<|end_header_id|> 넥사크로의 Form 스크립트에서 첫 번째 줄에 아래와 같은 코드가 있는 경우 로컬 변수로 처리됩니다. 일반적인 자바스크립트 코드였다면 전역 변수로 처리됩니다. 하지만 넥사크로는 그렇지 않습니다. <CodeTag> var value0 = 0; </CodeTag> 해당 코드가 빌드 과정을 거쳐 브라우저에서 동작하는 코드를 보면 어떤 차이가 있는지 확인할 수 있습니다. 빌드 과정을 거친 코드는 아래와 같습니다. 첫 번째 줄에 정의된 변수가 자동으로 생성된 함수 내에 포함되면서 로컬 변수로 처리됩니다. <CodeTag> this.registerScript('TEST.xfdl', function() { var value0 = 0;}); </CodeTag> 주의: Form 스크립트에서 전역 변수를 처리하고자 한다면 var 키워드를 사용하지 않고 변수를 정의할 수 있습니다. 하지만 전역 변수를 사용하면 앱 전체에 영향을 미칠 수 있어 적절한 유효범위를 지정해주어야 합니다. 함수 내에서 선언된 변수는 유효범위를 따로 지정하지 않고 사용할 수 있으며 매개변수로 전달된 값 역시 유효범위를 지정하지 않고 사용할 수 있습니다. <CodeTag> this.Button00_onclick = function(obj:nexacro.Button, e:nexacro.ClickEventInfo){ obj.set_text('button'); var a = 3; trace(a); // 3} </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 유효범위(Scope) this<|eot_id|><|start_header_id|>assistant<|end_header_id|> Application 또는 Form에서 사용되는 항목에 대해 유효범위를 지정할 때는 항상 this를 사용합니다. 변수뿐 아니라 속성, Form 간의 참조 시에도 적절한 유효범위를 지정해주어야 합니다. Form 내에서 변수는 아래와 같이 선언합니다. <CodeTag> this.formvalue = 4; </CodeTag> 함수를 선언할 때도 유효범위를 지정해주어야 합니다. 또한, 함수를 작성할 때 Form 내에 선언된 변수를 참조할 때도 유효범위를 지정해주어야 합니다. <CodeTag> this.formvalue = 4;this.test = function(){ this.formvalue = 3; this.parent.value = 3; this.parent.parent.value = 3;} </CodeTag> trace나 alert와 같은 메소드는 지정된 유효범위에 따라 자바스크립트 기본 문법에서 제공하는 메소드를 사용하거나 넥사크로에서 추가로 제공하는 메소드를 사용할 수 있습니다. 유효범위를 지정하지 않고 alert 메소드를 쓰는 것과 this 유효범위를 지정하는 것은 전혀 다른 메소드가 실행하는 것입니다. <CodeTag> this.Button00_onclick = function(obj:nexacro.Button, e:nexacro.ClickEventInfo){ alert(e.button); // JavaScript this.alert(e.button); // Form.alert() nexacro.getApplication.alert(e.button); // Application.alert()} </CodeTag> 함수 선언 시에도 유효범위를 지정해 해당하는 Application 또는 Form의 멤버로 포함되도록 합니다. <CodeTag> this.Button00_onclick = function(obj:nexacro.Button, e:nexacro.ClickEventInfo){...} </CodeTag> eval 함수로 Form을 접근하는 경우에도 this를 사용해야 합니다. <CodeTag> eval('this.formfunc()'); </CodeTag> 주의: 아래와 같이 함수를 직접 선언할 수도 있지만, Global로 처리되며 이후 지원이 중단될 수 있으므로 권장하지 않습니다. function Button00_onclick(obj:nexacro.Button, e:nexacro.ClickEventInfo) { ... }<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 유효범위(Scope) Global<|eot_id|><|start_header_id|>assistant<|end_header_id|> 넥사크로 스크립트 내에서 유효범위를 지정하지 않은 변수나 함수는 모두 최상위 Global 멤버로 처리됩니다. 아래와 같이 유효범위를 지정하지 않고 사용된 스크립트는 모두 Global로 처리됩니다. <CodeTag> globalvar = 2; var globalvar2 = 3; </CodeTag> 함수 내에 사용된 변수라도 유효범위를 지정하지 않으면 모두 Global로 처리됩니다. 단 var 키워드를 사용해 정의한 변수는 함수 밖에서 사용할 수 없습니다. <CodeTag> this.test = function(){ trace(globalvar); //2 trace(globalvar2); //3 value = 4; var localvar = 5;}this.test = function(){ trace(value); // 4 trace(localvar); // ReferenceError: localvar is not defined} </CodeTag> 주의: Form 내에서 다른 스크립트 파일을 include 하는 경우에는 내부적으로 스크립트를 함수로 처리합니다. 그래서 var 키워드를 사용할 때 주의해야 합니다. 예를 들어 includecode.xjs 파일 내 정의된 변수가 실제 generate 된 includecode.xjs.js 코드는 아래와 같습니다 (generate 된 코드는 버전에 따라 달라질 수 있습니다). <CodeTag> 코드 8- includecode.xjsbbb = 'bbb';var ccc = 'ccc'; </CodeTag> <CodeTag> 코드 8- includecode.xjs.js(function(){ return function(path) { var obj; // User Script this.registerScript(path, function() { bbb = 'bbb'; var ccc = 'ccc'; }); this.loadIncludeScript(path); obj = null; };})(); </CodeTag> 함수를 선언하거나 호출할 때도 유효범위를 지정해주어야 합니다. 아래 스크립트에서 test()와 this.test()는 서로 다른 함수를 호출합니다. 유효범위를 지정하지 않고 test()를 호출하게 되면 Global에 선언된 test 함수를 호출합니다. <CodeTag> this.Button00_onclick = function(obj:nexacro.Button, e:nexacro.ClickEventInfo){ test(); this.test();} </CodeTag> 아래와 같이 유효범위 없이 지정된 함수는 Global로 처리됩니다. <CodeTag> Button00_onclick = function(obj:nexacro.Button, e:nexacro.ClickEventInfo){...}function Button00_onclick(obj:nexacro.Button, e:nexacro.ClickEventInfo){...} </CodeTag> 주의: transaction()과 같은 Application 또는 Form 메소드는 해당하는 유효범위를 지정해주어야 합니다. //application nexacro.getApplication().exit(''); nexacro.getApplication().transaction(''); //Form this.close(''); this.go(''); this.transaction(''); 팁: Application 전체에서 사용하고 싶은 변수는 Global 변수가 아닌 AppVariables로 등록해서 사용하는 것을 권장합니다. <CodeTag> nexacro.getApplication().addVariable('aaa', 'TEST');trace(nexacro.getApplication().aaa); // TEST </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 유효범위(Scope) Expr<|eot_id|><|start_header_id|>assistant<|end_header_id|> Grid 컴포넌트 내에서 사용하는 expr 스크립트는 넥사크로 내부적으로 바인딩 된 Dataset을 기준으로 처리되기 때문에 별도의 유효범위를 지정하지 않아도 사용할 수 있습니다. 바인딩 되지 않은 Dataset에 직접 접근하려면 유효범위를 지정해주어야 합니다. 아래와 같이 바인딩 된 Dataset에 대해 expr를 사용하는 경우에는 this를 붙이지 않습니다. <CodeTag> <Cell text='expr:Column00'/><Cell text='expr:Column00.min'/><Cell text='expr:currow'/><Cell text='expr:rowposition'/><Cell text='expr:getSumNF('col0')'/> </CodeTag> <CodeTag> Dataset.set_filterstr('Column00=='test'');Dataset.filter('Column00=='test''); </CodeTag> expr 스크립트 내에서 바인딩 된 Grid 오브젝트, Dataset 컴포넌트, Cell 오브젝트를 지정하고자 할 때는 아래와 같은 변수 또는 지시자를 사용합니다. Grid: comp Dataset: dataset Cell: this <CodeTag> <Cell text='expr:this.col'/> <!-- Cell --><Cell text='expr:dataset.rowcount'/> <!-- Binded Dataset --><Cell text='expr:comp.currentcell'/> <!-- Grid --><Cell text='expr:dataset.parent.func1()'/> <!-- Form --><Cell text='expr:comp.parent.func1()'/> <!-- Form --> </CodeTag> 노트: Form에 대한 지시자를 별도로 제공하지 않으며 필요하면 comp.parent 또는 dataset.parent 와 같이 접근합니다. 주의: Form 내에 있는 함수에 접근할 때 comp.parent.func() 형식을 사용하지 않고 this를 사용하게 되면 오류로 처리됩니다. expr 스크립트에서 this는 Cell 오브젝트를 가리킵니다. <Cell text='expr:this.func01()'/> 컴포넌트 속성으로 Expr과 Text가 같이 있는 경우에 화면에 보이는 텍스트를 반환하는 getDisplayText 메소드를 사용할 수 있습니다. <CodeTag> this.Button00.set_text('text');this.Button00.set_expr('1+1');trace(this.Button00.text); // 'text'trace(this.Button00.expr); // '1+1'trace(this.Button00.getDisplayText()); // '2' </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 유효범위(Scope) lookup<|eot_id|><|start_header_id|>assistant<|end_header_id|> lookup 메소드는 유효범위를 지정해 접근하기 어려운 경우 사용할 수 있도록 설계된 추가 메소드입니다. 원하는 오브젝트나 함수를 id 또는 함수명을 가지고 찾을 수 있습니다. lookup 메소드는 아래와 같은 형식으로 사용할 수 있습니다. <CodeTag> Form.lookup( strid );nexacro.getApplication().lookup( strid );[Component].addEventHandlerLookup( eventid, funcid, target ); </CodeTag> 실제 코드에서는 아래와 같이 사용됩니다. <CodeTag> // this에서 상위로 검색해서 objectid에 해당하는 오브젝트를 반환var obj = this.lookup('objectid');// this에서 상위로 검색해서 fn_onclick에 해당하는 함수를 반환this.lookup('fn_onclick')();// this에서 상위로 검색해서 fn_onclick에 해당하는 함수를 이벤트 핸들러에서 처리btn00.addEventHandlerLookup( 'onclick', 'fn_onclick', this ); </CodeTag><|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 이벤트 핸들러<|eot_id|><|start_header_id|>assistant<|end_header_id|> 이벤트 처리를 위한 이벤트 핸들러는 넥사크로 스튜디오 속성창에서 추가하거나 각 컴포넌트, 오브젝트에 제공하는 메소드를 사용해 스크립트에서 추가할 수 있습니다.<|eot_id|>
<|begin_of_text|><|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 Today Date: 26 Jul 2024 넥사크로와 관련된 내용을 우선으로 대답해줘<|eot_id|><|start_header_id|>user<|end_header_id|> 이벤트 핸들러 메소드<|eot_id|><|start_header_id|>assistant<|end_header_id|> 스크립트 내에서 이벤트 처리를 위해 이벤트 함수를 추가, 설정하거나 삭제할 수 있는 메소드를 제공합니다. addEventHandler( eventid, funcobj, target ) addEventHandlerLookup( eventid, funcstr, target ) setEventHandler( eventid, funcobj, target ) setEventHandlerLookup( eventid, functstr, target ) removeEventHandler( eventid, funcobj, target ) removeEventHandlerLookup( eventid, funcstr, target ) 이벤트를 처리할 함수의 유효범위에 따라 적절한 메소드를 선택해 사용합니다. <CodeTag> this.btn00.setEventHandler('onclick', this.fn_onclick, this);this.dataset00.addEventHandlerLookup('onrowposchange', 'fn_onchange', this); </CodeTag> 주의: addEventHandlerLookup, setEventHandlerLookup, removeEventHandlerLookup 메소드는 앱 성능에 영향을 미칠 수 있으므로 필요한 경우만 사용을 권장합니다. 노트: 이벤트를 속성 창에서 생성하게 되면 아래와 같이 문자열로 설정됩니다. <Button id='Button00' ... onclick='Button00_onclick'/> 해당 코드는 빌드 작업 후 변환된 자바스크립트 코드에서는 아래와 같이 this 지시자를 붙여서 생성됩니다. this.Button00.addEventHandler('onclick', this.Button00_onclick, this);<|eot_id|>
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
1