I'm facing the console error issue with tinymce on vue.js. It works correctly both localhost and server hovewer editor throws me error on server (doesn't throw error on localhost).
console errors
Here is my import section
[I've tried import files both dynamically and statically, hovewer errors continue to exist]
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js">
import Editor from "#tinymce/tinymce-vue";
import "tinymce/tinymce";
// Theme
import "../../../../../../node_modules/tinymce/themes/silver/theme";
// Skins
import "../../../../../../node_modules/tinymce/skins/ui/oxide/skin.min.css";
import "../../../../../../node_modules/tinymce/skins/ui/oxide/content.min.css";
import "../../../../../../node_modules/tinymce/skins/content/default/content.min.css";
// Plugins
import "../../../../../../node_modules/tinymce/plugins/fullscreen";
import "../../../../../../node_modules/tinymce/plugins/paste";
import "../../../../../../node_modules/tinymce/plugins/autoresize";
import "../../../../../../node_modules/tinymce/icons/default";
</script>
I've solved my issue with writing :init="{content_css: false, skin: false}" property to editor tag
Related
before odoo15 we can import js with variable like this:
<script type="text/javascript" t-attf-src="https://api.map.baidu.com/api?v=3.0&type=webgl&ak=#{baidu_ak}"></script>
but when it comes to odoo15, all js files were moved to __mainfest__.py file, so
is there a way to import js file with varaible?
I have placed the logback-test.xml in classpath
karate.log is not getting generated, I have seen there is a file called main.log that gets generated sometime
Here is the project structure
Here is the runner file
package com.org.KarateLearning;
import com.intuit.karate.KarateOptions;
import com.intuit.karate.Results;
import com.intuit.karate.Runner;
import com.intuit.karate.junit4.Karate;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Map;
import java.util.Properties;
import static org.junit.Assert.assertTrue;
public class ParallelTestRunner {
#Test
public void parallel() {
Results res = Runner.path("classpath:features").tags("~#ignore").parallel(5);
assertTrue(res.getErrorMessages(),res.getFailCount()==0);
}}
I have tried placing logback-test.xml in resources and com.org.KarateLearning but karate.log is not getting genearted
Deleted the existing file ( logback-test.xml ) and created a new one from below path under src/test/java
https://github.com/intuit/karate/blob/master/karate-demo/src/test/java/logback-test.xml
Now file is getting generated in target folder
In between it was getting generated outside of target folder. Now its getting generated at correct location inside target folder.
Also note even after deleting the logback-test.xml log was getting generated. (not sure about the reason for it)
Now all works well
I am new to Katalon studio and am trying to run my test case but it's always filed as it says:
Error:
Test Cases/Logging in FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Unable to >click on object 'Object Repository/Page_BaseLine - test/input_Przypomnienie o fakturze' (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: 'Object Repository/Page_BaseLine - test/input_Przypomnienie o fakturze' located by 'By.xpath: >//input[#id='SubmitButton']' not found)
I tried to do it manually but everytime the same problem appears, what shall I do then?
Here is my source code:
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory
import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
WebUI.openBrowser('')
def plik = new File('Config.txt')
def lines = plik.readLines()
WebUI.navigateToUrl(lines[0])
WebUI.setText(findTestObject('Object Repository/Page_Demo version BaseLine/input_Login form_LoginTextBox'), lines[1])
WebUI.setText(findTestObject('Object Repository/Page_Demo version BaseLine/input_Login form_PasswordTextB'), lines[2])
WebUI.click(findTestObject('Object Repository/Page_Demo version BaseLine/input_remember me_LoginButton'))
WebUI.click(findTestObject('Page_BaseLine - test/a_Kontrahenci'))
WebUI.click(findTestObject('Page_BaseLine - test/a_Dodaj Kontrahenta'))
WebUI.setText(findTestObject('own/Page_BaseLine - test/input_Nazwa skrcona_ShortNameT'), 'greg12')
WebUI.setText(findTestObject('own/Page_BaseLine - test/textarea_'), 'Grzegorz Spytek12')
WebUI.click(findTestObject('Page_BaseLine - test/input_Przypomnienie o fakturze'))
WebUI.click(findTestObject('Page_BaseLine - test/input_Opis_CloseButton'))
Thanks for help.
The xpath seems not correct. Could you try removing the '>'?
>//input[#id='SubmitButton']'
I'm writing a web component using StencilJS. One of the helper classes (ArrayHelper.ts) which is imported by my component has these import at the top:
import transform from 'lodash/transform';
import isEmpty from 'lodash/isEmpty';
import isEqual from 'lodash/isEqual';
import isObject from 'lodash/isObject';
this all works fine when compiling and serving locally. However, when writing some unit tests and executing them using jest, jest can't resolve these imports properly:
TypeError: isObject_1.default is not a function at Function.Object.
<anonymous>.ArrayHelper.toArray (/mycomponent/ArrayHelper.ts:15:35)
When I change the imports in ArrayHelper.ts to
import { isEmpty, isEqual, isObject, transform } from 'lodash';
then Jest will succesfully run the tests without problems but then the TS compilation by stencilJS doesn't work any more:
Missing Export: mycomponents/ArrayHelper.js:5:27
'isObject' is not exported by node_modules/lodash/lodash.js
Any ideas how to get these imports right for both situations?
Try import lodash like this
import * as _ from "lodash";
Try adding this to your stencil.config.js:
nodeResolve: {
browser: true
}
This is happening because lodash is not available where Jest is running your tests. Is it an experimental browser technology.
Refer - Link1 Link2
import * as transform from 'lodash/transform';
import * as isEmpty from 'lodash/isEmpty';
import * as isEqual from 'lodash/isEqual';
import * as isObject from 'lodash/isObject';
I have a Jmeter webdriver sampler script it is running fine in Jmeter. Now I want it to run on blazemeter. Since I was using local directory in Jmeter it was fine. But I am not able to upload file using any path. Can some body help on this. I need to upload file in blazemeter using jmeter webdriver sampler. What path Can I give and where should I keep my file?
Also I tried my file keeping in shared folders of Blazemeter. but I failed in that. Please some body give some syntax for it.
import org.apache.jmeter.services.FileServer;
import org.openqa.selenium;
import java.awt.Robot;
import org.openqa.selenium.interactions.Action;
import org.openqa.selenium.interactions.Actions;
import java.awt.Toolkit;
import java.awt.datatransfer.StringSelection;
import java.awt.event.KeyEvent;
import org.openqa.selenium.firefox.FirefoxProfile;
import java.time.temporal.ChronoUnit;
import java.time.format.DateTimeFormatter;
import java.time.LocalDateTime;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.By;
import java.io.FileReader;
import java.io.BufferedReader;
import java.io.FileWriter;
import java.util.concurrent.TimeUnit;
import java.util.ArrayList;
import org.testng.asserts.SoftAssert;
import java.util.List;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.support.ui.ExpectedConditions;
WebDriverWait wait= new WebDriverWait(WDS.browser,20);
WDS.sampleResult.sampleStart();
wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//ul[#class='menu-main']/child::li"))).click();
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//p[#class='btn btn-outline']"))).click();
WDS.log.info("Dialog box");
Robot robot= new Robot();
robot.setAutoDelay(2000);
filepath="home/jmeter/Deepak/ColumnFunctionFile.csv";
StringSelection stringselection = new StringSelection(filepath);
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(stringselection, null);
robot.setAutoDelay(1000);
WDS.log.info("Copy");
robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_V);
WDS.log.info("release");
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.keyRelease(KeyEvent.VK_V);
WDS.log.info("enter press release");
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
robot.setAutoDelay(2000);
//upload file status
WebDriverWait wait2= new WebDriverWait(WDS.browser,5);
oldTimeForProgress=LocalDateTime.now();
try{
wait2.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//div[#class='progress progress-mini']")));
WDS.log.info("--------------------------------Progress bar gets invisible now-------------------");
}
catch(Exception e)
{
WDS.log.info("---------------Looking like file got stuck in processing messages----------------");
}
As far as I can see from the Selenium Webdriver Based Testing article you should just upload your .jmx script and BlazeMeter will pick it up. Just make sure not to use Internet Explorer as their systems seem to be running on Linux so only Firefox and Chrome are supported.
Also my expectation is that you should reach out to BlazeMeter Support in case of any issues, they should be more aware of their infrastructure than anyone here.