我正在使用 Firefox 和 Geckodriver 在 docker 容器内运行 selenium 测试。当以 root 身份运行该容器时,一切正常。
当以非 root 用户 (USER 1000) 运行容器时,驱动程序无法初始化:
[[1;31mERROR[m] test01_WO_default_dashboard Time elapsed: 132.6 s <<< ERROR!
org.openqa.selenium.TimeoutException:
Failed to read marionette port
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'testrunner-cockpit-3--1-mdbwj', ip: '10.130.2.18', os.name: 'Linux', os.arch: 'amd64', os.version: '4.18.0-305.28.1.el8_4.x86_64', java.version: '11.0.15'
Driver info: driver.version: FirefoxDriver
remote stacktrace:
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$new$0(W3CHandshakeResponse.java:57)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:122)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127) …Run Code Online (Sandbox Code Playgroud) 我正在使用JHipster,当我运行时,sudo mvn liquibase:diff我得到以下错误
[INFO] Settings
----------------------------
[INFO] driver: org.postgresql.Driver
[INFO] url: jdbc:postgresql://localhost/gastos8
[INFO] username: gastos8
[INFO] password: *****
[INFO] use empty password: false
[INFO] properties file: null
[INFO] properties file will override? false
[INFO] prompt on non-local database? true
[INFO] clear checksums? false
[INFO] changeLogFile: src/main/resources/config/liquibase/master.xml
[INFO] context(s): null
[INFO] label(s): null
[INFO] referenceDriver: null
[INFO] referenceUrl: hibernate:spring:com.cboujon.domain?dialect=org.hibernate.dialect.PostgreSQL82Dialect
[INFO] referenceUsername: null
[INFO] referencePassword: null
[INFO] referenceDefaultSchema: null
[INFO] diffChangeLogFile: src/main/resources/config/liquibase/changelog/20150807132702_changelog.xml
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] …Run Code Online (Sandbox Code Playgroud) 表有两列Name,Age。按名称搜索作品。当您键入用户名时,表格将缩减为特定的用户名。
但我希望使用比较运算符<或>.
html
<div id="demo" class="container">
<div class="row">
<div class="col-md-6">
<input v-model="search" class="form-control" placeholder="Username to search">
</div>
<div class="col-md-1">
<select class="form-control" v-model="searchOperator">
<option value=">">></option>
<option value="<"><</option>
</select>
</div>
<div class="col-md-5">
<input v-model="searchName" class="form-control" placeholder="Age">
</div>
</div>
<table class="table table-striped">
<thead>
<tr>
<th v-repeat="column: columns">
<a href="#" v-on="click: sortBy(column)" v-class="active: sortKey == column">
{{ column | capitalize }}
</a>
</th>
</tr>
</thead>
<tbody>
<tr v-repeat="users | filterBy search | orderBy sortKey reverse"> …Run Code Online (Sandbox Code Playgroud) 弹簧座控制器
@PostMapping(
value = "/post",
produces = MediaType.APPLICATION_JSON_VALUE,
consumes = {MediaType.APPLICATION_JSON_VALUE, MediaType.MULTIPART_FORM_DATA_VALUE}
)
public ResponseEntity<User> handleFileUpload(@RequestParam("user") User user, @RequestPart("file") MultipartFile file) {
// do something with User and file
return ResponseEntity.ok().build();
}
Run Code Online (Sandbox Code Playgroud)
角度服务
@Injectable()
export class UploadFileService {
constructor(private http: HttpClient) { }
pushFileToStorage(file: File): Observable<HttpEvent<{}>> {
let formdata: FormData = new FormData();
formdata.append('file', file);
formdata.append('user', JSON.stringify(new User('John', 12)))
const req = new HttpRequest('POST', '/post', formdata, {
reportProgress: true,
});
return this.http.request(req);
}
}
Run Code Online (Sandbox Code Playgroud)
当我尝试发送请求时,我得到 500 Internal Server Error.
这是一个请求头 …
我的项目中有以下 REST 控制器方法
@RequestMapping(method = GET, value = "applications", produces = {MediaType.APPLICATION_JSON_VALUE})
public @ResponseBody
ResponseEntity<?> getApplications(@QuerydslPredicate(root = Application.class) Predicate predicate,
PersistentEntityResourceAssembler resourceAssembler, Pageable page) {
Page<ApplicationProjection> applications = appRepo.findAll(predicate, page).
map(item -> projectionFactory.createProjection(ApplicationProjection.class, item));
return new ResponseEntity<>(pagedResourcesAssembler.toResource(applications), HttpStatus.OK);
}
Run Code Online (Sandbox Code Playgroud)
现在我想根据条件删除页面的一些元素。如何在 Spring Data Rest 中实现?
spring ×2
angular ×1
docker ×1
firefox ×1
geckodriver ×1
java ×1
javascript ×1
jhipster ×1
liquibase ×1
maven ×1
querydsl ×1
selenium ×1
spring-boot ×1
typescript ×1
vue.js ×1