I'm trying to use Zebble.Drawing in my UWP project but the project doesn't build with this error: 'Drawing.Line' does not contain a definition for 'Id'. Here's the code for my Zebble page:
<?xml version="1.0"?>
<z-Component z-type="ActionBar" z-base="Page" z-namespace="UI.Pages"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./../.zebble-schema.xml">
<Stack Style.Margin.Top="10" Style.Margin.Left="5">
<Drawing>
<Drawing.Line></Drawing.Line>
</Drawing>
</Stack>
</z-Component>
And here's the line in .zebble-generated.cs file that causes the error:
var __drawing_Line1 = new Drawing.Line { Id = "__drawing_Line1" };
Any help is greatly appreciated.
Thanks for reporting this. The Id has been added to the Line drawing and will be available in next release. Meanwhile, you can use the source code available in following GitHub repository:
https://github.com/Geeksltd/Zebble.Drawing
Related
I imported the target xml file into the AtlasMap Data Mapper UI as below:
<?xml version="1.0" encoding="UTF-8"?>
<ns:XmlOE xmlns:ns="http://atlasmap.io/xml/test/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns:Address>
<ns:addressLine1>1040 Notexisting St</ns:addressLine1>
<ns:zipCode>01886</ns:zipCode>
</ns:Address>
<ns:Contact>
<ns:fullName>Totton</ns:fullName>
<ns:phoneNumber>123-456-7890</ns:phoneNumber>
<ns:zipCode>01886</ns:zipCode>
</ns:Contact>
</ns:XmlOE>
Then I exported it to *.adm file and after that importing it to the eclipse.
There is the log:
log_and_code
I run main class and get errors.
If I use *.adm file from example project and re-export it from AtlasMap Data Mapper UI, it work well.
The answer from #igarashitm
You'd need to copy Document ID of the imported target document from
UI and use it as a key to retrieve a target document. Or simply use
getDefaultTargetDocumentIO. When you import a document, an auto
generated Document ID is assigned which has GUID suffix. So the
target document is no longer XMLInstanceSource.
In my case getDefaultTargetDocument() works well.
I believe it is the Document ID he is referring to.
I have a project and am trying to use SetTag on my views. But I need a resource id, so according to internet advices, I have created a tags.xml file in my Resources/values folder, like below:
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<item name="TAG_VIEWPAGER_PAGELAYOUT" type="id"/>
<item name="TAG_VIEWPAGER_PAGEPOSITION" type="id"/>
</resources>
Then I try to access it like so after a clean and rebuild, but it doesn't find it. It says TAG_VIEWPAGER_PAGEPOSITION cannot be found.
view.SetTag(Resource.Id.TAG_VIEWPAGER_PAGEPOSITION, position);
Help? I am using Android 5.0 Level 21, C# Xamarin
TRY:
Open the resourcedesigner.cs file [you might want to back it up if you've never done this before]
Click in the file
use CTRL + A to highlight all the code
delete the contents of resourcedesigner.cs completely
clean the solution
rebuild the solution [resourcedesigner.cs should reload automatically]
Sometimes the resource designer file can't keep up with your changes.
If this doesn't work then try searching for TAG_VIEWPAGER_PAGEPOSITION in your resourcedesigner.cs file and let me know if it's in there
It just required a restart for VS, and then everything worked.. so much time trying other solutions.. so agitating...
My Appium script perfectly working on local but moving to aws device farm, returns parsing error because of one class file.
I am trying to import data from an excel file within this class file. I think error because of the path of excel file.
I upload the data excel file as extra data in aws but i can’t find out the location.
public static void changeCity() throws InterruptedException{
try{
File src = new File("data1.xls");
Workbook wb = Workbook.getWorkbook(src);
Sheet sh1 = wb.getSheet(0);
Sheet bugzillaUpdation = wb.getSheet("UtilityCredentials");
Please help me to resolve the issue.
#jmp
I used junit and put the location as
File src = new File("/acme-android-appium/src/test/resources/data1.xls");
I am not clear about the XML file you said above. Can you please explain how can we find file in my script.
Please take a look at the attached image.
I work for the AWS Device Farm team.
To read a .xlsx or .csv file the following two approaches can be used:
Make sure the excel file is placed under src/test/resources/com/yourexcelfile.xlsx/csv
This will place the file in the test jar file under the com folder.
Once that is confirmed you should be able to read the file using one of the two code snippets below:
Without any external libraries:
java.net.URL resource = ClassLoader.getSystemResource("/com/yourexcelfile.xlsx");
File file = new File(resource.toURI());
FileInputStream input = new FileInputStream(file);
OR
If you are using Apache POI APIs for reading excel files:
InputStream ins = getClass().getResourceAsStream(“/com/yourexcelfile.xlsx”);
workbook = new XSSFWorkbook(ins);
sheet = workbook.getSheetAt(1);
ins.close();
Hope this helps.
What happens if you try putting the file in the src/test/java/resources/ of the project? That way it would be built with the jar and device farm may have reference to it then.
[update]
Tried this myself with the example project from awslabs github page[1]. I also optionally created a testng.xml file that contained this xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Default Suite">
<test name="test">
<classes>
<class name="file.FindFile"/>
</classes>
</test>
</suite>
This file is located in /Referenceapp-Appium-Test/src/test/resources/testng.xml and is referenced from the pom.xml using this plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
The testng.xml is used here to only run the specific test and not all the of the tests in the example project. It is optional and here for FYI knowledge.
I then created a test.csv file in the same directory and created a new package 'file' with a test class inside of it 'FindFile':
package file;
import java.io.File;
import org.testng.annotations.Test;
import Pages.BasePage;
import io.appium.java_client.AppiumDriver;
public class FindFile extends BasePage {
protected FindFile(AppiumDriver driver) {
super(driver);
// TODO Auto-generated constructor stub
}
#Test
public static void changeCity() throws InterruptedException{
try{
File src = new File("/Referenceapp-Appium-Test/src/test/resources/test.csv");
System.out.println("File found!!!");
}catch(Exception e){
System.out.println(e);
}
}
}
So when I executed this it in device farm with a random apk I had it only executed the tests inside of the FindFile.java. When I looked at the appium java output I seen my println there so that is how I know it works.
[TestNG] RUNNING: Suite: "Command line test" containing "1" Tests (config: null)
[TestNG] INVOKING: "Command line test" - file.FindFile.changeCity()
[Invoker 1121172875] Invoking file.FindFile.changeCity
File found!!!
[TestNG] PASSED: "Command line test" - file.FindFile.changeCity() finished in 35 ms
===== Invoked methods
FindFile.changeCity()[pri:0, instance:null] <static>
=====
Creating /tmp/scratchLT6UDz.scratch/resultsm_f_bN/Command line suite/Command line test.html
Creating /tmp/scratchLT6UDz.scratch/resultsm_f_bN/Command line suite/Command line test.xml
PASSED: changeCity
Hope that Helps
Best Regards
James
[1] https://github.com/awslabs/aws-device-farm-appium-tests-for-sample-app
I tried to use GDSL Scripts for my grails project in IDEA.
I tried things as shown in the Guide: GDSL Guide. The Steps I followed were:
Created a myDef.gdsl file in my project home(i.e. in the folder
that containg grails-app, web-app etc)
In that file i added this code:
def ctx2 = context(ctype: "com.myPackage.MyClass")
contributor(ctx2) {
method(name: 'withLock', type: 'void', params: [closure: { }])
}
Clicked on Activate.
But it still does not show any autocomplete or recognise when I do:
Myclass m = new MyClass()
m.withLock() //This is not recognised
What am I doing wrong??? :(
Details:
Idea Series: Ultimate
Idea Version: 107.535
The GDSL file should be located under some source root. Grails module content roots aren't source roots. So please consider putting it into src/main/groovy, for example.
When using JBOSS Tools, M2E and M2E-WTP creating a new composite component wants to put the newly created component in the wrong directory. It also looks for components in the wrong directory.
It should be putting it in the directory:
src/main/webapp/resources/components/group-name/tagname.xhtml
but instead it is looking for it (and a quick fix creates file) in:
target/m2e-wtp/web-resources/resources/components/group-name/tagname.xhtml
Here are the versions I am using:
JBoss Tools RichFaces for Eclipse Version:
3.2.1.v20110730-1214-H169-Final
M2E - Maven Integration for Eclipse
Version: 1.0.0.20110607-2117
Maven Integration for WTP
Version: 0.13.1.20110728-1800
Update:
Seems to pick the first path in .settings/org.eclipse.wst.common.component file. Changing the non m2e to be first seems to make it want to put it in the right place.
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="hcbb">
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<property name="context-root" value="hcbb"/>
<property name="java-output-path" value="/hcbb/target/classes"/>
</wb-module>
</project-modules>
However, it is still complaining about missing or invalid attributes and not doing auto completion on the custom components.. Not sure if JSF Tools even does that though.
I believe this issue is fixed in later release of joss tools 3.3.x.
If not please open bug and we'll look at it.