我正在尝试在UIScrollView上使用左右滑动.然而,即使向右滑动,看起来向左滑动在iPhone模拟器中也不起作用.我错过了任何一步吗?
- (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; self.scrollView.multipleTouchEnabled = YES; UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipe:)]; swipe.delaysTouchesBegan = YES; swipe.numberOfTouchesRequired = 2; [self.scrollView addGestureRecognizer:swipe]; [swipe release]; } - (void)handleSwipe:(UISwipeGestureRecognizer *)recognizer { if (recognizer.direction == UISwipeGestureRecognizerDirectionLeft) { } else if (recognizer.direction == UISwipeGestureRecognizerDirectionRight) { } }
我正在使用Cucumber,webrat和selenium来测试Web应用程序.我用" 我应该看到"某些东西来验证变化.但是,在许多地方,要验证的文本只会从隐藏更改为可见(这可能是由于从自身或其祖先中删除了'隐藏'类).在这种情况下,上述测试实际上并未验证更改.我试图使用'response.should_not have_tag("div#myId.hidden")',这不起作用.推荐的测试方法是什么?
环境:黄瓜0.3.11,selenium-client 1.2.17,webrat 0.6.0
谢谢.