小编Sow*_*arz的帖子

WebDriver - 元素不可点击Chrome

我有以下问题.我在Firefox和Chrome上运行测试.在Firefox测试运行正确但Chrome SauceLabs上给出了一条消息:

unknown error: Element is not clickable at point (717, 657). Other
element would receive the click: <div class="col-md-9 col-sm-12"
style="margin-top:8px;">...</div> (Session info: chrome=36.0.1985.125)
(Driver info: chromedriver=2.10.267521,platform=Windows NT 6.3 x86_64)
Run Code Online (Sandbox Code Playgroud)

我以同样的方式在两个测试中通过唯一的css选择器选择元素:

driver.FindElement(By.CssSelector("button.btn-xs:nth-child(1)")).Click();
Run Code Online (Sandbox Code Playgroud)

任何想法在这里有什么不对?

c# selenium google-chrome saucelabs selenium-webdriver

11
推荐指数
2
解决办法
1万
查看次数

Selenium - Modal对话框目前 - 如何接受信息?

我有以下问题.在页面上提交一些日期后,我有一个模态对话框,如图所示:

在此输入图像描述

我想点击"ENTER"来完成该模态,但它不起作用.我有以下代码:

driver.FindElement(By.CssSelector("input.submit")).Click();
Actions action = new Actions(driver);
action.SendKeys(OpenQA.Selenium.Keys.Enter);
Run Code Online (Sandbox Code Playgroud)

点击继续手动测试后返回下一页.我必须通过这个模式继续测试.任何想法如何解决这个问题?

c# selenium nunit modal-dialog selenium-webdriver

4
推荐指数
1
解决办法
8515
查看次数

在gitbash中使用git pull运行批处理文件

我有以下问题.我想编写批处理文件并在vm上每天运行此文件.

我在vm上有一个ssh密钥,所以如果我在gitbash中手动编写"git pull",那么之后我就不必写密码了.

现在我想在批处理文件中编写脚本,这将自动执行.

c://TESTS/test/tes - 我想从repo中只提取这个文件夹.

我不知道如何创建那种脚本.有任何想法吗?

git batch-file git-bash

4
推荐指数
1
解决办法
1万
查看次数

如何在CaptureElement中旋转相机视图?

我有以下问题.我写的StackPanelCaptureElement:

 <StackPanel>
        <CaptureElement x:Name="PreviewElement"
                        HorizontalAlignment="Center" 
                        VerticalAlignment="Center"
                        Width="380"
                        Height="560"
                        Stretch="UniformToFill"/>
 </StackPanel>
Run Code Online (Sandbox Code Playgroud)

在该视图下的xaml.cs文件中:

protected override async void OnNavigatedTo(NavigationEventArgs e)
{
     cameraCapture = new CameraCapture();
     PreviewElement.Source = await cameraCapture.Initialize();
     await cameraCapture.StartPreview();            
} 
Run Code Online (Sandbox Code Playgroud)

我有一个类CameraCapture.cs,我有各种方法:

public class CameraCapture 
    {
        MediaCapture mediaCapture;
        ImageEncodingProperties imgEncodingProperties;

        public async Task<MediaCapture> Initialize(CaptureUse primaryUse = CaptureUse.Photo)
        {
            //Create media capture and INIT
            var cameraID = await GetCameraID(Windows.Devices.Enumeration.Panel.Back);
            mediaCapture = new MediaCapture();
            await mediaCapture.InitializeAsync(new MediaCaptureInitializationSettings
            {
                StreamingCaptureMode = StreamingCaptureMode.Video,
                PhotoCaptureSource = PhotoCaptureSource.Photo,
                AudioDeviceId = string.Empty,
                VideoDeviceId = cameraID.Id …
Run Code Online (Sandbox Code Playgroud)

c# xaml camera windows-phone-8 windows-phone-8.1

1
推荐指数
1
解决办法
3612
查看次数